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

    <!-- Repository Embedded Deployment Receiver Configuration -->
     
    <!--  command queue for deployment service -->
    <bean id="deploymentReceiverCommandQueue" class="org.alfresco.deployment.impl.server.DeploymentCommandQueueImpl" > 
    </bean> 

    <!--  Housekeeper for the deployment queue  -->
    <bean id="commandQueueHousekeeper" class="org.alfresco.deployment.impl.server.DeploymentCommandQueueHousekeeper"
    	init-method="init">
    	<property name="commandQueue"><ref bean="deploymentReceiverCommandQueue" /></property>
    </bean>    
    
    <!--  Management for reader threads -->
    <bean id="deploymentReaderManagement" class="org.alfresco.deployment.impl.server.ReaderManagementPool" > 
    </bean> 

    <!-- This is the deployment engine which is built into the repository  -->
    <bean id="deploymentReceiverEngine" 
    	class="org.alfresco.deployment.impl.server.DeploymentReceiverEngineImpl" 
        init-method="init">
        
        <!-- How long to wait before polling housekeeping -->
        <property name="pollDelay"><value>${wcm-deployment-receiver.poll.delay}</value></property>
        
        <property name="commandQueue"><ref bean="deploymentReceiverCommandQueue" /></property>
        
        <property name="readerManagement"><ref bean="deploymentReaderManagement" /></property>
        
        <!--  This is the repo based deployment engine which does not need a keep alive thread -->
        <property name="daemonThread"><value>true</value></property>
        
        <!-- Define your content transformers here 
        <property name="transformers"> 
            <list>
            </list>
        </property>
        -->
        
        <!-- Define your housekeepers here -->
        <property name="housekeepers">
        	<set>
        	<ref bean="commandQueueHousekeeper"/>
        	</set>
        </property>
    </bean>
    
    <!--  The remote interface for the deployment receiver engine -->
    
	<bean id="deploymentReceiverTransportRMI" class="org.springframework.remoting.rmi.RmiServiceExporter">
		<property name="service">
			<ref bean="deploymentReceiverEngine"/>
		</property>
		<property name="serviceInterface">
			<value>org.alfresco.deployment.DeploymentReceiverTransport</value>
		</property>
		<property name="serviceName">
			<value>deployment</value>
		</property>
		<property name="registryPort">
			<value>${alfresco.rmi.services.port}</value>
		</property>
		<property name="servicePort">
			<value>${wcm-deployment-receiver.rmi.service.port}</value>
		</property>
		<property name="registryHost">
            <value>${alfresco.rmi.services.host}</value>
        </property>
	</bean>
	
	<!--  Now import the deployment targets -->
	<import resource="classpath*:alfresco/deployment/*-target.xml" />
	<import resource="classpath*:alfresco/extension/deployment/*-target.xml" />
    
</beans>
