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

<beans>
    <!-- Remote authentication service. -->
    <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>

	<!-- Remote interface for AVM. -->
	<bean id="avmRemote" class="org.alfresco.repo.remote.AVMRemoteImpl">
	    <property name="avmRemoteTransport">
	        <ref bean="avmRemoteTransport"/>
	    </property>
	</bean>

	<!-- RMI Proxy bean for avmRemoteTransport -->
	<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>    
</beans>
