<?xml version="1.0" encoding="UTF-8"?>
<!--=============================================================================-->
 <!-- Generated from                                                              -->
 <!-- file:/C:/a/Eclipse/apache/uima-as/src/test/resources/deploy/iq2AE.xml -->
 <!-- 2 April, 2009, 11:37:42 A.M.                                                -->
 <!--=============================================================================-->
 <!DOCTYPE beans
  PUBLIC "-//Spring//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>

   <!-- Factory for specific external queue broker:  -->
   <!--            tcp://localhost:61616             -->
   <bean id="qBroker_tcp_c__ss_localhost_c_61616"
         class="org.apache.activemq.ActiveMQConnectionFactory">
      <property name="brokerURL" value="tcp://localhost:61616"/>
      <property name="prefetchPolicy" ref="prefetchPolicy"/>
   </bean>

   <!-- Factory for specific external queue broker:  -->
   <!--            tcp://localhost:61616             -->
   <bean id="qBroker_tcp_c__ss_localhost_c_61616-reply"
         class="org.apache.activemq.ActiveMQConnectionFactory">
      <property name="brokerURL" value="tcp://localhost:61616"/>
      <property name="prefetchPolicy" ref="prefetchPolicy-reply"/>
   </bean>

   <!-- Creates an instance of the ResourceManager -->
   <bean id="resourceManager" class="org.apache.uima.aae.UimaClassFactory"
         factory-method="produceResourceManager"
         singleton="true"/>

   <!-- Creates an instance of the CasManager  -->
   <bean id="casManager" class="org.apache.uima.aae.AsynchAECasManager_impl"
         singleton="true">
      <constructor-arg index="0" ref="resourceManager"/>

     <!-- Defines how many CASes will be in the CAS pool -->
     <property name="casPoolSize" value="5"/>

     <!-- Initial heap size for CASes  -->
     <property name="initialFsHeapSize" value="2000000"/>
   </bean>
   <bean id="placeholderSubstitution"
         class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
      <property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE"/>
   </bean>

   <!-- Creates a Shared Cache -->
   <bean id="inProcessCache" class="org.apache.uima.aae.InProcessCache"/>

   <!-- Create prefetch policy -->
   <bean id="prefetchPolicy" class="org.apache.activemq.ActiveMQPrefetchPolicy">
      <property name="queuePrefetch" value="0"/>
   </bean>
   <bean id="prefetchPolicy-reply" class="org.apache.activemq.ActiveMQPrefetchPolicy">
      <property name="queuePrefetch" value="1"/>
   </bean>
 
   <!--=================================-->
   <!--    E r r o r   D e t a i l s    -->
   <!--=================================-->
   <bean id="errorConfig__TCnt_0_TWndw_0_Action_"
         class="org.apache.uima.aae.error.Threshold"
         singleton="true">
      <property name="threshold" value="0"/>
      <property name="window" value="0"/>
      <property name="action" value=""/>
   </bean>

   <bean id="errorConfig__Action_" class="org.apache.uima.aae.error.Threshold"
         singleton="true">
      <property name="action" value=""/>
   </bean>

 
   <!--input queue for service-->
   <bean id="top_level_input_queue_service_1"
         class="org.apache.activemq.command.ActiveMQQueue">
      <constructor-arg index="0" value="RoomNumberAnnotatorQueue"/>
   </bean>
   <!--=======================================================-->
   <!-- Primitive or non-Async Aggr: RoomNumberAnnotatorQueue -->
   <!--=======================================================-->
   <bean id="primitive_ctlr_RoomNumberAnnotatorQueue_1"
         class="org.apache.uima.aae.controller.PrimitiveAnalysisEngineController_impl"
         init-method="initialize">
      <constructor-arg index="0">
         <null/>
      </constructor-arg>

     <!--      Key name      -->
     <constructor-arg index="1" value="RoomNumberAnnotatorQueue"/>
      <constructor-arg index="2"
                       value="file:/C:/a/Eclipse/apache/uima-as/src/test/resources/descriptors/tutorial/ex2/RoomNumberAnnotator.xml"/>
      <constructor-arg index="3" ref="casManager"/>
      <constructor-arg index="4" ref="inProcessCache"/>

     <!-- this parameter is ignored  -->
     <constructor-arg index="5" value="10"/>

     <!-- scaleout number of instances -->
     <constructor-arg index="6" value="1"/>
      <property name="outputChannel" ref="outChnl_RoomNumberAnnotatorQueue_1"/>
      <property name="errorHandlerChain" ref="err_hdlr_chn_RoomNumberAnnotatorQueue_1"/>
   </bean>

   <!-- ThreadPool Task Executor -->
   <bean id="pooling_RoomNumberAnnotatorQueue_1"
         class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
      <property name="corePoolSize" value="1"/>
      <property name="maxPoolSize" value="1"/>
      <property name="queueCapacity" value="1"/>
   </bean>
 
   <!--============================================================-->
   <!--   M E S S A G E    H A N D L E R: primitive                -->
   <!--  for controller: primitive_ctlr_RoomNumberAnnotatorQueue_1 -->
   <!--============================================================-->
   
   <bean id="primitive_metaMsgHandler_RoomNumberAnnotatorQueue_1"
         class="org.apache.uima.aae.handler.input.MetadataRequestHandler_impl">
      <constructor-arg index="0" value="MetadataRequestHandler"/>
      <property name="controller" ref="primitive_ctlr_RoomNumberAnnotatorQueue_1"/>
      <property name="delegate"
                ref="primitive_processRequestHandler_RoomNumberAnnotatorQueue_1"/>
   </bean>

   <bean id="primitive_processRequestHandler_RoomNumberAnnotatorQueue_1"
         class="org.apache.uima.aae.handler.input.ProcessRequestHandler_impl">
      <constructor-arg index="0" value="ProcessRequestHandler"/>
      <property name="controller" ref="primitive_ctlr_RoomNumberAnnotatorQueue_1"/>
   </bean>

   <!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
   <!-- JMS msg listener for input queue for:  -->
   <!--    top_level_input_queue_service_1     -->
   <!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
   <bean id="primitive_input_q_listenerID_RoomNumberAnnotatorQueue_1"
         class="org.apache.uima.adapter.jms.activemq.JmsInputChannel">
      <property name="messageHandler" ref="primitive_metaMsgHandler_RoomNumberAnnotatorQueue_1"/>
      <property name="endpointName" value="top_level_input_queue_service_1"/>
      <property name="controller" ref="primitive_ctlr_RoomNumberAnnotatorQueue_1"/>
      <property name="listenerContainer"
                ref="primitive_input_msgLsnrCntnr_RoomNumberAnnotatorQueue_1"/>
   </bean>

   <!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
   <!-- JMS msg listener container for input queue for:  -->
   <!--         top_level_input_queue_service_1          -->
   <!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
   <bean id="primitive_input_msgLsnrCntnr_RoomNumberAnnotatorQueue_1"
         class="org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerContainer">

     <!-- Connect to pooling task executor for primitive -->
     <property name="taskExecutor" ref="pooling_RoomNumberAnnotatorQueue_1"/>

     <!-- Define number of JMS Consumers -->
     <property name="concurrentConsumers" value="1"/>

     <!--    input Queue     -->
     <property name="destination" ref="top_level_input_queue_service_1"/>

     <!-- POJO to delegate JMS Messages to -->
     <property name="messageListener"
                ref="primitive_input_q_listenerID_RoomNumberAnnotatorQueue_1"/>
      <property name="connectionFactory" ref="qBroker_tcp_c__ss_localhost_c_61616"/>
      <property name="messageSelector" value="Command=2000 OR Command=2002"/>
   </bean>

   <!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
   <!-- GetMeta JMS msg listener container for input queue for:  -->
   <!--             top_level_input_queue_service_1              -->
   <!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
   <bean id="primitive_input_msgLsnrCntnr_RoomNumberAnnotatorQueue_1_getMeta"
         class="org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerContainer">

     <!-- Define number of JMS Consumers -->
     <property name="concurrentConsumers" value="1"/>

     <!--    input Queue     -->
     <property name="destination" ref="top_level_input_queue_service_1"/>

     <!-- POJO to delegate JMS Messages to -->
     <property name="messageListener"
                ref="primitive_input_q_listenerID_RoomNumberAnnotatorQueue_1"/>
      <property name="connectionFactory" ref="qBroker_tcp_c__ss_localhost_c_61616"/>
      <property name="messageSelector" value="Command=2001"/>
   </bean>

   <!-- ================================== -->
   <!-- OutputChannel - for flows out of   -->
   <!-- this component, both to delegates  -->
   <!--  (if aggr) and back up to sender   -->
   <!-- ================================== -->
   <bean id="outChnl_RoomNumberAnnotatorQueue_1"
         class="org.apache.uima.adapter.jms.activemq.JmsOutputChannel"
         init-method="initialize">
      <property name="serviceInputEndpoint" value="RoomNumberAnnotatorQueue"/>
      <property name="controller" ref="primitive_ctlr_RoomNumberAnnotatorQueue_1"/>
   </bean>
   <bean id="err_hndlr_processCasEr_"
         class="org.apache.uima.aae.error.handler.ProcessCasErrorHandler">
      <constructor-arg>
         <map>
            <entry key="">
               <ref bean="errorConfig__TCnt_0_TWndw_0_Action_"/>
            </entry>
         </map>
      </constructor-arg>
   </bean>
   <bean id="err_hndlr_collectionProcessCompleteEr_"
         class="org.apache.uima.aae.error.handler.CpcErrorHandler">
      <constructor-arg>
         <map>
            <entry key="">
               <ref bean="errorConfig__Action_"/>
            </entry>
         </map>
      </constructor-arg>
   </bean>
   <!--=======================-->
   <!--  Error Handler Chain  -->
   <!--=======================-->
   <bean id="err_hdlr_chn_RoomNumberAnnotatorQueue_1"
         class="org.apache.uima.aae.error.ErrorHandlerChain">
      <constructor-arg>
         <list>
            <ref local="err_hndlr_processCasEr_"/>
            <ref local="err_hndlr_collectionProcessCompleteEr_"/>
         </list>
      </constructor-arg>
   </bean>
</beans>