<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<beans>
    <!-- Remote AVM interface -->
    <bean id="avmRemote" class="org.alfresco.repo.remote.AVMRemoteImpl">
        <property name="avmRemoteTransport">
            <ref bean="avmRemoteTransport"/>
        </property>
    </bean>
    
    <bean id="avmRemoteTransport" class="org.springframework.remoting.rmi.RmiProxyFactoryBean">
        <property name="serviceUrl">
            <value>rmi://localhost:1313/avm</value>
        </property>
        <property name="serviceInterface">
            <value>org.alfresco.service.cmr.remote.AVMRemoteTransport</value>
        </property>
        <property name="refreshStubOnConnectFailure">
            <value>true</value>
        </property>
    </bean>

	<bean id="avmSyncService" class="org.alfresco.repo.remote.AVMSyncServiceClient">
	    <property name="avmSyncServiceTransport">
	    	<ref bean="avmSyncServiceTransport"/>
	    </property>
	</bean>

    <bean id="avmSyncServiceTransport" class="org.springframework.remoting.rmi.RmiProxyFactoryBean">
        <property name="serviceUrl">
            <value>rmi://localhost:1313/avmsync</value>
        </property>
        <property name="serviceInterface">
            <value>org.alfresco.service.cmr.remote.AVMSyncServiceTransport</value>
        </property>
        <property name="refreshStubOnConnectFailure">
            <value>true</value>
        </property>
    </bean>    
    
    <bean id="authenticationService" class="org.springframework.remoting.rmi.RmiProxyFactoryBean">
        <property name="serviceUrl">
            <value>rmi://localhost:1313/authentication</value>
        </property>
        <property name="serviceInterface">
            <value>org.alfresco.service.cmr.security.AuthenticationService</value>
        </property>
        <property name="refreshStubOnConnectFailure">
            <value>true</value>
        </property>
    </bean>
    
    <bean id="repoRemoteTransport" class="org.springframework.remoting.rmi.RmiProxyFactoryBean">
        <property name="serviceUrl">
            <value>rmi://localhost:1313/repo</value>
        </property>
        <property name="serviceInterface">
            <value>org.alfresco.service.cmr.remote.RepoRemoteTransport</value>
        </property>
        <property name="refreshStubOnConnectFailure">
            <value>true</value>
        </property>
    </bean>
    
    <bean id="repoRemote" class="org.alfresco.repo.remote.RepoRemoteImpl">
        <property name="repoRemoteTransport">
            <ref bean="repoRemoteTransport"/>
        </property>
    </bean>
</beans>
