You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by sc...@apache.org on 2009/11/13 23:50:14 UTC
svn commit: r836046 - in /incubator/uima/uima-as/trunk/uima-as-distr/src:
main/scripts/ test/java/org/apache/uima/as/dd/ test/resources/deploy/
test/resources/deploy/expected/
Author: schor
Date: Fri Nov 13 22:50:13 2009
New Revision: 836046
URL: http://svn.apache.org/viewvc?rev=836046&view=rev
Log:
UIMA-1666 add check and 2 test cases
Added:
incubator/uima/uima-as/trunk/uima-as-distr/src/test/resources/deploy/defaultingPrimAEMultInstanceDiffCasPool.xml
incubator/uima/uima-as/trunk/uima-as-distr/src/test/resources/deploy/defaultingPrimAEMultInstanceSameCasPool.xml
incubator/uima/uima-as/trunk/uima-as-distr/src/test/resources/deploy/expected/defaultingPrimAEMultInstanceDiffCasPool.xml
incubator/uima/uima-as/trunk/uima-as-distr/src/test/resources/deploy/expected/defaultingPrimAEMultInstanceSameCasPool.xml
Modified:
incubator/uima/uima-as/trunk/uima-as-distr/src/main/scripts/dd2spring.xsl
incubator/uima/uima-as/trunk/uima-as-distr/src/test/java/org/apache/uima/as/dd/Dd2SpringTest.java
Modified: incubator/uima/uima-as/trunk/uima-as-distr/src/main/scripts/dd2spring.xsl
URL: http://svn.apache.org/viewvc/incubator/uima/uima-as/trunk/uima-as-distr/src/main/scripts/dd2spring.xsl?rev=836046&r1=836045&r2=836046&view=diff
==============================================================================
--- incubator/uima/uima-as/trunk/uima-as-distr/src/main/scripts/dd2spring.xsl (original)
+++ incubator/uima/uima-as/trunk/uima-as-distr/src/main/scripts/dd2spring.xsl Fri Nov 13 22:50:13 2009
@@ -1462,7 +1462,7 @@
<xsl:choose>
<xsl:when test="not(u:casPool)">
<xsl:choose>
- <xsl:when test="u:service/u:analysisEngine[(not(@async)) or (@async = ('no', 'false'))]/u:scaleout/@numberOfInstances">
+ <xsl:when test= "u:service/u:analysisEngine[(not(@async)) or (@async = ('no', 'false'))]/u:scaleout/@numberOfInstances">
<u:casPool numberOfCASes="{u:service/u:analysisEngine[(not(@async)) or (@async = ('no', 'false'))]/u:scaleout/@numberOfInstances}"
initialFsHeapSize="defaultFsHeapSize"/>
</xsl:when>
@@ -1492,7 +1492,37 @@
<!-- <casPool> -->
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<xsl:template mode="addDefaults" match="u:casPool">
- <u:casPool numberOfCASes="{if (./@numberOfCASes) then ./@numberOfCASes else '1'}"
+
+ <!-- UIMA-1666
+ if it's an non-async primitive at the top level which is scaled out,
+ if the scaleout != the caspool size, give a warning message and force the caspool size to be the scaleout
+ -->
+ <xsl:variable name="isTopLvlSync" as="xs:boolean" select=
+ "if (../u:service/u:analysisEngine[(not(@async)) or (@async = ('no', 'false'))]) then fn:true() else fn:false()"/>
+
+ <xsl:variable name="nbrInstances" select="../u:service/u:analysisEngine/u:scaleout/@numberOfInstances"/>
+
+ <xsl:variable name="casPoolSize" as="xs:integer">
+ <xsl:choose>
+ <xsl:when test="$isTopLvlSync and
+ $nbrInstances and
+ ./@numberOfCASes and
+ ($nbrInstances ne ./@numberOfCASes)">
+ <xsl:sequence select="f:msgWithLineNumber(
+ 'WARN',
+ ('Top level Async Primitive specifies a scaleout of', $nbrInstances,
+ ', but also specifies a Cas Pool size of', ./@numberOfCASes,
+ '. The Cas Pool size is being forced to be the same as the scaleout.'),
+ .)"/>
+ <xsl:sequence select="$nbrInstances"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:sequence select="if (./@numberOfCASes) then ./@numberOfCASes else '1'"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <u:casPool numberOfCASes="{$casPoolSize}"
initialFsHeapSize="{if (./@initialFsHeapSize) then ./@initialFsHeapSize else 'defaultFsHeapSize'}"/>
</xsl:template>
Modified: incubator/uima/uima-as/trunk/uima-as-distr/src/test/java/org/apache/uima/as/dd/Dd2SpringTest.java
URL: http://svn.apache.org/viewvc/incubator/uima/uima-as/trunk/uima-as-distr/src/test/java/org/apache/uima/as/dd/Dd2SpringTest.java?rev=836046&r1=836045&r2=836046&view=diff
==============================================================================
--- incubator/uima/uima-as/trunk/uima-as-distr/src/test/java/org/apache/uima/as/dd/Dd2SpringTest.java (original)
+++ incubator/uima/uima-as/trunk/uima-as-distr/src/test/java/org/apache/uima/as/dd/Dd2SpringTest.java Fri Nov 13 22:50:13 2009
@@ -90,6 +90,19 @@
}
+ public void testDd2Spring_dfltPrimMultiInstanceSame() throws Exception {
+ checkDd2Spring("defaultingPrimAEMultInstanceSameCasPool.xml");
+ }
+
+ public void testDd2Spring_dfltPrimMultiInstanceDiff() throws Exception {
+// checkDd2Spring("defaultingPrimAEMultInstanceDiffCasPool.xml");
+ checkDd2SpringErrMsg(
+ "defaultingPrimAEMultInstanceDiffCasPool.xml",
+ "running test defaultingPrimAEMultInstanceDiffCasPool.xml: \n" +
+" *** WARN: line-number: 26 Top level Async Primitive specifies a scaleout of numberOfInstances=\"40\", but also specifies a Cas Pool size of numberOfCASes=\"30\". The Cas Pool size is being forced to be the same as the scaleout.");
+
+ }
+
public void testAggregateWithInnerAggregateCM() throws Exception {
checkDd2Spring("aggregateWithInnerAggregateCM.xml");
}
Added: incubator/uima/uima-as/trunk/uima-as-distr/src/test/resources/deploy/defaultingPrimAEMultInstanceDiffCasPool.xml
URL: http://svn.apache.org/viewvc/incubator/uima/uima-as/trunk/uima-as-distr/src/test/resources/deploy/defaultingPrimAEMultInstanceDiffCasPool.xml?rev=836046&view=auto
==============================================================================
--- incubator/uima/uima-as/trunk/uima-as-distr/src/test/resources/deploy/defaultingPrimAEMultInstanceDiffCasPool.xml (added)
+++ incubator/uima/uima-as/trunk/uima-as-distr/src/test/resources/deploy/defaultingPrimAEMultInstanceDiffCasPool.xml Fri Nov 13 22:50:13 2009
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+ <!--
+ ***************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ***************************************************************
+ -->
+<analysisEngineDeploymentDescription
+ xmlns="http://uima.apache.org/resourceSpecifier">
+ <name>Meeting Detector TAE</name>
+ <deployment protocol="jms" provider="activemq">
+ <casPool numberOfCASes="30" initialFsHeapSize="400"/>
+ <service>
+ <inputQueue endpoint="RoomNumberAnnotatorQueue"
+ brokerURL="tcp://localhost:61616"/>
+ <topDescriptor>
+ <import
+ location="../descriptors/tutorial/ex2/RoomNumberAnnotator.xml"/>
+ </topDescriptor>
+ <analysisEngine>
+ <scaleout numberOfInstances="40"/>
+ </analysisEngine>
+ </service>
+
+ </deployment>
+</analysisEngineDeploymentDescription>
\ No newline at end of file
Added: incubator/uima/uima-as/trunk/uima-as-distr/src/test/resources/deploy/defaultingPrimAEMultInstanceSameCasPool.xml
URL: http://svn.apache.org/viewvc/incubator/uima/uima-as/trunk/uima-as-distr/src/test/resources/deploy/defaultingPrimAEMultInstanceSameCasPool.xml?rev=836046&view=auto
==============================================================================
--- incubator/uima/uima-as/trunk/uima-as-distr/src/test/resources/deploy/defaultingPrimAEMultInstanceSameCasPool.xml (added)
+++ incubator/uima/uima-as/trunk/uima-as-distr/src/test/resources/deploy/defaultingPrimAEMultInstanceSameCasPool.xml Fri Nov 13 22:50:13 2009
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+ <!--
+ ***************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ***************************************************************
+ -->
+<analysisEngineDeploymentDescription
+ xmlns="http://uima.apache.org/resourceSpecifier">
+ <name>Meeting Detector TAE</name>
+ <deployment protocol="jms" provider="activemq">
+ <casPool numberOfCASes="40" initialFsHeapSize="400"/>
+ <service>
+ <inputQueue endpoint="RoomNumberAnnotatorQueue"
+ brokerURL="tcp://localhost:61616"/>
+ <topDescriptor>
+ <import
+ location="../descriptors/tutorial/ex2/RoomNumberAnnotator.xml"/>
+ </topDescriptor>
+ <analysisEngine>
+ <scaleout numberOfInstances="40"/>
+ </analysisEngine>
+ </service>
+
+ </deployment>
+</analysisEngineDeploymentDescription>
\ No newline at end of file
Added: incubator/uima/uima-as/trunk/uima-as-distr/src/test/resources/deploy/expected/defaultingPrimAEMultInstanceDiffCasPool.xml
URL: http://svn.apache.org/viewvc/incubator/uima/uima-as/trunk/uima-as-distr/src/test/resources/deploy/expected/defaultingPrimAEMultInstanceDiffCasPool.xml?rev=836046&view=auto
==============================================================================
--- incubator/uima/uima-as/trunk/uima-as-distr/src/test/resources/deploy/expected/defaultingPrimAEMultInstanceDiffCasPool.xml (added)
+++ incubator/uima/uima-as/trunk/uima-as-distr/src/test/resources/deploy/expected/defaultingPrimAEMultInstanceDiffCasPool.xml Fri Nov 13 22:50:13 2009
@@ -0,0 +1,233 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--==================================================================================-->
+ <!-- Generated from -->
+ <!-- file:/C:/a/Eclipse/apache/uima-as-distr/src/test/resources/deploy/defaultingPrimAEMultInstanceDiffCasPool.xml -->
+ <!-- 13 November, 2009, 5:37:43 P.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="40"/>
+
+ <!-- Initial heap size for CASes -->
+ <property name="initialFsHeapSize" value="400"/>
+ </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-distr/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="40"/>
+ <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="40"/>
+ <property name="maxPoolSize" value="40"/>
+ <property name="queueCapacity" value="40"/>
+ </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="40"/>
+
+ <!-- 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>
\ No newline at end of file
Added: incubator/uima/uima-as/trunk/uima-as-distr/src/test/resources/deploy/expected/defaultingPrimAEMultInstanceSameCasPool.xml
URL: http://svn.apache.org/viewvc/incubator/uima/uima-as/trunk/uima-as-distr/src/test/resources/deploy/expected/defaultingPrimAEMultInstanceSameCasPool.xml?rev=836046&view=auto
==============================================================================
--- incubator/uima/uima-as/trunk/uima-as-distr/src/test/resources/deploy/expected/defaultingPrimAEMultInstanceSameCasPool.xml (added)
+++ incubator/uima/uima-as/trunk/uima-as-distr/src/test/resources/deploy/expected/defaultingPrimAEMultInstanceSameCasPool.xml Fri Nov 13 22:50:13 2009
@@ -0,0 +1,233 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--==================================================================================-->
+ <!-- Generated from -->
+ <!-- file:/C:/a/Eclipse/apache/uima-as-distr/src/test/resources/deploy/defaultingPrimAEMultInstanceSameCasPool.xml -->
+ <!-- 13 November, 2009, 5:32:36 P.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="40"/>
+
+ <!-- Initial heap size for CASes -->
+ <property name="initialFsHeapSize" value="400"/>
+ </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-distr/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="40"/>
+ <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="40"/>
+ <property name="maxPoolSize" value="40"/>
+ <property name="queueCapacity" value="40"/>
+ </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="40"/>
+
+ <!-- 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>
\ No newline at end of file