You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by cw...@apache.org on 2009/01/22 18:01:14 UTC
svn commit: r736709 - in
/incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src:
main/java/org/apache/uima/adapter/jms/activemq/
main/java/org/apache/uima/adapter/jms/client/
test/java/org/apache/uima/ee/test/ test/java/org/apache/uima/ee/test/flo...
Author: cwiklik
Date: Thu Jan 22 09:01:14 2009
New Revision: 736709
URL: http://svn.apache.org/viewvc?rev=736709&view=rev
Log:
UIMA-1127 Modified to send GetMeta as a Ping message on service timeout.
Added:
incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/deployment/Deploy_MeetingDetectorAggregate.xml
incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/deployment/Deploy_MeetingDetectorTAEWithCM_RemoteRoomNumberDisable.xml
incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/deployment/Deploy_MeetingDetectorTAE_RemoteRoomNumberDisable.xml
incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/descriptors/analysis_engine/NoOpAnnotatorExpecting1000Cases.xml
incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/descriptors/tutorial/ex4/MeetingDetectorTAEContinueOnError.xml
incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/descriptors/tutorial/ex4/MeetingDetectorTAEWithCMContinueOnError.xml
Modified:
incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsEndpointConnection_impl.java
incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/client/BaseUIMAAsynchronousEngine_impl.java
incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/java/org/apache/uima/ee/test/TestUimaASExtended.java
incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/java/org/apache/uima/ee/test/flow/AdvancedFixedFlowController.java
incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/java/org/apache/uima/ee/test/utils/BaseTestSupport.java
incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/deployment/Deploy_AggregateAnnotatorWithLongDelayDelegate.xml
incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/deployment/Deploy_MeetingDetectorTAE_RemoteRoomNumber.xml
incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/descriptors/analysis_engine/SimpleTestAggregateWithParallelFlow.xml
incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/descriptors/analysis_engine/SimpleTestAggregateWithParallelFlows.xml
Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsEndpointConnection_impl.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsEndpointConnection_impl.java?rev=736709&r1=736708&r2=736709&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsEndpointConnection_impl.java (original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsEndpointConnection_impl.java Thu Jan 22 09:01:14 2009
@@ -49,6 +49,7 @@
import org.apache.uima.aae.controller.AggregateAnalysisEngineController;
import org.apache.uima.aae.controller.AnalysisEngineController;
import org.apache.uima.aae.controller.Endpoint;
+import org.apache.uima.aae.delegate.Delegate;
import org.apache.uima.aae.error.AsynchAEException;
import org.apache.uima.aae.error.InvalidMessageException;
import org.apache.uima.aae.error.ServiceShutdownException;
@@ -512,6 +513,19 @@
// Using the queue name lookup the delegate key
String key = ((AggregateAnalysisEngineController)controller).lookUpDelegateKey(delegateEndpoint.getEndpoint());
if ( key != null && destination != null && !isReplyEndpoint ) {
+ // For Process Requests check the state of the delegate that is to receive
+ // the CAS. If the delegate state = TIMEOUT_STATE, push the CAS id onto
+ // delegate's list of delayed CASes. The state of the delegate was
+ // changed to TIMEOUT when a previous CAS timed out.
+ int msgType = aMessage.getIntProperty(AsynchAEMessage.MessageType);
+ int command = aMessage.getIntProperty(AsynchAEMessage.Command);
+ if (msgType != AsynchAEMessage.Request && command == AsynchAEMessage.Process ) {
+ String casReferenceId = aMessage.getStringProperty(AsynchAEMessage.CasReference);
+ if ( casReferenceId != null &&
+ ((AggregateAnalysisEngineController)controller).delayCasIfDelegateInTimedOutState(casReferenceId, delegateEndpoint.getEndpoint()) ) {
+ return true;
+ }
+ }
// The aggregate has a master list of endpoints which are typically cloned during processing
// This object uses a copy of the master. When a listener fails, the status of the master
// endpoint is changed. To check the status, fetch the master endpoint, check its status
Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/client/BaseUIMAAsynchronousEngine_impl.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/client/BaseUIMAAsynchronousEngine_impl.java?rev=736709&r1=736708&r2=736709&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/client/BaseUIMAAsynchronousEngine_impl.java (original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/client/BaseUIMAAsynchronousEngine_impl.java Thu Jan 22 09:01:14 2009
@@ -468,6 +468,7 @@
}
super.serviceDelegate = new ClientServiceDelegate(endpoint,applicationName,this);
super.serviceDelegate.setCasProcessTimeout(processTimeout);
+ super.serviceDelegate.setGetMetaTimeout(metadataTimeout);
try
{
jmxManager = new JmxManager("org.apache.uima");
Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/java/org/apache/uima/ee/test/TestUimaASExtended.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/java/org/apache/uima/ee/test/TestUimaASExtended.java?rev=736709&r1=736708&r2=736709&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/java/org/apache/uima/ee/test/TestUimaASExtended.java (original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/java/org/apache/uima/ee/test/TestUimaASExtended.java Thu Jan 22 09:01:14 2009
@@ -363,8 +363,162 @@
// Deploy Uima EE Primitive Service
deployService(eeUimaEngine, relativePath+"/Deploy_PersonTitleAnnotator.xml");
super.setExpectingServiceShutdown();
- runTest(null,eeUimaEngine,String.valueOf(broker.getMasterConnectorURI()),"PersonTitleAnnotatorQueue", 5, PROCESS_LATCH);
+ runTest(null,eeUimaEngine,String.valueOf(broker.getMasterConnectorURI()),"PersonTitleAnnotatorQueue", 5, PROCESS_LATCH);
}
+
+ /**
+ * Deploys a Primitive Uima EE service and sends 5 CASes to it.
+ *
+ * @throws Exception
+ */
+
+ public void testSyncAggregateProcess() throws Exception
+ {
+ System.out.println("-------------- testSyncAggregateProcess -------------");
+ // Instantiate Uima EE Client
+ BaseUIMAAsynchronousEngine_impl eeUimaEngine = new BaseUIMAAsynchronousEngine_impl();
+ // Deploy Uima EE Primitive Service
+ deployService(eeUimaEngine, relativePath+"/Deploy_MeetingDetectorAggregate.xml");
+ super.setExpectingServiceShutdown();
+ runTest(null,eeUimaEngine,String.valueOf(broker.getMasterConnectorURI()),"MeetingDetectorQueue", 5, PROCESS_LATCH);
+ }
+
+ /**
+ * Deploys a Primitive Uima EE service and sends 5 CASes to it.
+ *
+ * @throws Exception
+ */
+
+ public void testPrimitiveServiceProcessPingFailure() throws Exception
+ {
+ System.out.println("-------------- testPrimitiveServiceProcessPingFailure -------------");
+ // Instantiate Uima EE Client
+ final BaseUIMAAsynchronousEngine_impl eeUimaEngine = new BaseUIMAAsynchronousEngine_impl();
+ // Deploy Uima EE Primitive Service
+ final String containerID = deployService(eeUimaEngine, relativePath+"/Deploy_PersonTitleAnnotator.xml");
+ super.setExpectingServiceShutdown();
+ Map<String, Object> appCtx = buildContext( String.valueOf(broker.getMasterConnectorURI()), "PersonTitleAnnotatorQueue" );
+ // Set an explicit getMeta (Ping)timeout
+ appCtx.put(UimaAsynchronousEngine.GetMetaTimeout, 2000 );
+ // Set an explicit process timeout so to test the ping on timeout
+ appCtx.put(UimaAsynchronousEngine.Timeout, 1000 );
+ // Spin a thread and wait for awhile before killing the remote service.
+ // This will cause the client to timeout waiting for a CAS reply and
+ // to send a Ping message to test service availability. The Ping times
+ // out and causes the client API to stop.
+ new Thread() {
+ public void run()
+ {
+ Object mux = new Object();
+ synchronized( mux ) {
+ try {
+ mux.wait(500);
+ // Undeploy service container
+ eeUimaEngine.undeploy(containerID);
+ } catch (Exception e) {}
+ }
+ }
+ }.start();
+
+ try {
+ // RuntimeException is expected due to failure
+ runTest(appCtx,eeUimaEngine,String.valueOf(broker.getMasterConnectorURI()),"PersonTitleAnnotatorQueue", 500, EXCEPTION_LATCH);
+ } catch( RuntimeException e) {}
+
+ }
+
+ /**
+ * Tests error handling on delegate timeout. The Delegate is started as remote,
+ * the aggregate initializes and the client starts sending CASes. After a short
+ * while the client kills the remote delegate. The aggregate receives a CAS
+ * timeout and disables the delegate. A timed out CAS is sent to the next
+ * delegate in the pipeline. ALL 1000 CASes are returned to the client.
+ *
+ * @throws Exception
+ */
+ public void testDelegateTimeoutAndDisable() throws Exception
+ {
+ System.out.println("-------------- testDelegateTimeoutAndDisable -------------");
+ // Instantiate Uima EE Client
+ final BaseUIMAAsynchronousEngine_impl eeUimaEngine = new BaseUIMAAsynchronousEngine_impl();
+ // Deploy Uima EE Primitive Service
+ final String containerID = deployService(eeUimaEngine, relativePath+"/Deploy_RoomNumberAnnotator.xml");
+ deployService(eeUimaEngine, relativePath+"/Deploy_MeetingDetectorTAE_RemoteRoomNumberDisable.xml");
+ super.setExpectingServiceShutdown();
+ Map<String, Object> appCtx = buildContext( String.valueOf(broker.getMasterConnectorURI()), "MeetingDetectorTaeQueue" );
+ // Set an explicit getMeta (Ping)timeout
+ appCtx.put(UimaAsynchronousEngine.GetMetaTimeout, 2000 );
+ // Set an explicit process timeout so to test the ping on timeout
+ appCtx.put(UimaAsynchronousEngine.Timeout, 1000 );
+ // Spin a thread and wait for awhile before killing the remote service.
+ // This will cause the client to timeout waiting for a CAS reply and
+ // to send a Ping message to test service availability. The Ping times
+ // out and causes the client API to stop.
+
+ new Thread() {
+ public void run()
+ {
+ Object mux = new Object();
+ synchronized( mux ) {
+ try {
+ mux.wait(300);
+ // Undeploy service container
+ eeUimaEngine.undeploy(containerID);
+ } catch (Exception e) {}
+ }
+ }
+ }.start();
+
+ runTest(null,eeUimaEngine,String.valueOf(broker.getMasterConnectorURI()),"MeetingDetectorTaeQueue", 1000, PROCESS_LATCH);
+
+ }
+ /**
+ * This test kills a remote Delegate while in the middle of processing 1000 CASes.
+ * The CAS timeout error handling disables the delegate and forces ALL CASes
+ * from the Pending Reply List to go through Error Handler. The Flow Controller
+ * is configured to continueOnError and CASes that timed out are allowed to
+ * continue to the next delegate. ALL 1000 CASes are accounted for in the
+ * NoOp Annotator that is last in the flow.
+ *
+ * @throws Exception
+ */
+ public void testDisableDelegateOnTimeoutWithCM() throws Exception
+ {
+ System.out.println("-------------- testDisableDelegateOnTimeoutWithCM -------------");
+ // Instantiate Uima EE Client
+ final BaseUIMAAsynchronousEngine_impl eeUimaEngine = new BaseUIMAAsynchronousEngine_impl();
+ // Deploy Uima EE Primitive Service
+ final String containerID = deployService(eeUimaEngine, relativePath+"/Deploy_RoomNumberAnnotator.xml");
+ deployService(eeUimaEngine, relativePath+"/Deploy_MeetingDetectorTAEWithCM_RemoteRoomNumberDisable.xml");
+ super.setExpectingServiceShutdown();
+ Map<String, Object> appCtx = buildContext( String.valueOf(broker.getMasterConnectorURI()), "MeetingDetectorTaeQueue" );
+ // Set an explicit getMeta (Ping)timeout
+ appCtx.put(UimaAsynchronousEngine.GetMetaTimeout, 2000 );
+ // Set an explicit process timeout so to test the ping on timeout
+ appCtx.put(UimaAsynchronousEngine.Timeout, 1000 );
+ // Spin a thread and wait for awhile before killing the remote service.
+ // This will cause the client to timeout waiting for a CAS reply and
+ // to send a Ping message to test service availability. The Ping times
+ // out and causes the client API to stop.
+
+ new Thread() {
+ public void run()
+ {
+ Object mux = new Object();
+ synchronized( mux ) {
+ try {
+ mux.wait(300);
+ // Undeploy service container
+ eeUimaEngine.undeploy(containerID);
+ } catch (Exception e) {}
+ }
+ }
+ }.start();
+
+ runTest(null,eeUimaEngine,String.valueOf(broker.getMasterConnectorURI()),"MeetingDetectorTaeQueue", 1, PROCESS_LATCH);
+
+ }
+
/**
* Tests Uima EE client ability to test sendAndReceive in multiple/concurrent threads
* It spawns 4 thread each sending 100 CASes to a Primitive Uima EE service
@@ -376,7 +530,7 @@
int howManyCASesPerRunningThread = 100;
int howManyRunningThreads = 4;
super.setExpectingServiceShutdown();
- runTestWithMultipleThreads(relativePath+"/Deploy_PersonTitleAnnotator.xml", "PersonTitleAnnotatorQueue", howManyCASesPerRunningThread, howManyRunningThreads, 0 );
+ runTestWithMultipleThreads(relativePath+"/Deploy_PersonTitleAnnotator.xml", "PersonTitleAnnotatorQueue", howManyCASesPerRunningThread, howManyRunningThreads, 0, 0 );
}
/**
*
@@ -433,13 +587,12 @@
*/
public void testAggregateProcessCallWithLastCM() throws Exception
{
-
- System.out.println("-------------- testAggregateProcessCallWithLastCM -------------");
+ System.out.println("-------------- testAggregateProcessCallWithLastCM -------------");
BaseUIMAAsynchronousEngine_impl eeUimaEngine = new BaseUIMAAsynchronousEngine_impl();
// Deploy Uima EE Primitive Services each with 6000ms delay in process()
deployService(eeUimaEngine, relativePath+"/Deploy_AggregateWithLastCM.xml");
super.setExpectingServiceShutdown();
- runTest(null,eeUimaEngine,String.valueOf(broker.getMasterConnectorURI()),"TopLevelTaeQueue", 1, PROCESS_LATCH, true);
+ runTest(null,eeUimaEngine,String.valueOf(broker.getMasterConnectorURI()),"TopLevelTaeQueue", 1, PROCESS_LATCH, true);
}
/**
@@ -449,15 +602,38 @@
*
* @throws Exception
*/
+
public void testTimeoutInSynchCallProcessWithMultipleThreads() throws Exception
{
- System.out.println("-------------- testTimeoutInSynchCallProcessWithMultipleThreads -------------");
- int howManyCASesPerRunningThread = 100;
+ System.out.println("-------------- testTimeoutInSynchCallProcessWithMultipleThreads -------------");
+ int howManyCASesPerRunningThread = 2;
int howManyRunningThreads = 4;
super.setExpectingServiceShutdown();
- runTestWithMultipleThreads(relativePath+"/Deploy_NoOpAnnotatorWithLongDelay.xml", "NoOpAnnotatorQueueLongDelay", howManyCASesPerRunningThread, howManyRunningThreads, 2000 );
-
+ int processTimeout = 2000;
+ int getMetaTimeout = 500;
+ runTestWithMultipleThreads(relativePath+"/Deploy_NoOpAnnotatorWithLongDelay.xml", "NoOpAnnotatorQueueLongDelay", howManyCASesPerRunningThread, howManyRunningThreads, processTimeout, getMetaTimeout );
}
+
+ /**
+ * Tests shutdown while running with multiple/concurrent threads
+ * The Annotator throws an exception and the Aggregate error handling is setup to terminate
+ * on the first error.
+ *
+ * @throws Exception
+ */
+
+ public void testTimeoutFailureInSynchCallProcessWithMultipleThreads() throws Exception
+ {
+ System.out.println("-------------- testTimeoutFailureInSynchCallProcessWithMultipleThreads -------------");
+ int howManyCASesPerRunningThread = 1000;
+ int howManyRunningThreads = 4;
+ super.setExpectingServiceShutdown();
+ int processTimeout = 2000;
+ int getMetaTimeout = 500;
+ runTestWithMultipleThreads(relativePath+"/Deploy_NoOpAnnotator.xml", "NoOpAnnotatorQueue", howManyCASesPerRunningThread, howManyRunningThreads, 2000, 1000, true );
+
+ }
+
/**
* Tests a parallel flow in the Uima EE aggregate.
*
@@ -526,9 +702,36 @@
appCtx.put(UimaAsynchronousEngine.Timeout, 13000 );
addExceptionToignore(org.apache.uima.aae.error.UimaEEServiceException.class);
addExceptionToignore(org.apache.uima.aae.error.UimaASProcessCasTimeout.class);
-
+
runTest(appCtx, eeUimaEngine, null, null, 1, PROCESS_LATCH);
}
+
+ /**
+ * Tests Timeout logic
+ * @throws Exception
+ */
+ public void testDisableOnRemoteDelegatePingTimeout() throws Exception
+ {
+ System.out.println("-------------- testDisableOnRemoteDelegatePingTimeout -------------");
+ System.out.println("The Aggregate sends 2 CASes to the NoOp Annotator which");
+ System.out.println("delays each CAS for 6000ms. The timeout is set to 4000ms");
+ System.out.println("Two CAS retries are expected");
+ BaseUIMAAsynchronousEngine_impl eeUimaEngine = new BaseUIMAAsynchronousEngine_impl();
+ String delegateContainerId = deployService(eeUimaEngine, relativePath+"/Deploy_NoOpAnnotatorWithLongDelay.xml");
+ deployService(eeUimaEngine, relativePath+"/Deploy_AggregateAnnotatorWithLongDelayDelegate.xml");
+ Map<String, Object> appCtx = buildContext( String.valueOf(broker.getMasterConnectorURI()), "TopLevelTaeQueue" );
+ // The Remote NoOp delays each CAS for 6000ms. The Aggregate sends two CASes so adjust
+ // client timeout to be just over 12000ms.
+ appCtx.put(UimaAsynchronousEngine.Timeout, 13000 );
+ addExceptionToignore(org.apache.uima.aae.error.UimaEEServiceException.class);
+ addExceptionToignore(org.apache.uima.aae.error.UimaASProcessCasTimeout.class);
+ // Remove container with the remote NoOp delegate so that we can test
+ // the CAS Process and Ping timeout.
+ eeUimaEngine.undeploy(delegateContainerId);
+ // Send the CAS and handle exception
+ runTest(appCtx, eeUimaEngine, null, null, 1, EXCEPTION_LATCH);
+ }
+
public void testDeployAggregateWithCollocatedAggregateService() throws Exception
{
System.out.println("-------------- testDeployAggregateWithCollocatedAggregateService -------------");
@@ -746,7 +949,6 @@
System.out.println("-------------- testProcessParallelFlowWithDelegateDisable -------------");
// Create Uima EE Client
BaseUIMAAsynchronousEngine_impl eeUimaEngine = new BaseUIMAAsynchronousEngine_impl();
- UIMAFramework.getLogger().setLevel(Level.FINE);
deployService(eeUimaEngine, relativePath+"/Deploy_NoOpAnnotatorWithException.xml");
deployService(eeUimaEngine, relativePath+"/Deploy_NoOpAnnotator2.xml");
deployService(eeUimaEngine, relativePath+"/Deploy_AggregateWithParallelFlowDisableOnDelegateFailure.xml");
Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/java/org/apache/uima/ee/test/flow/AdvancedFixedFlowController.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/java/org/apache/uima/ee/test/flow/AdvancedFixedFlowController.java?rev=736709&r1=736708&r2=736709&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/java/org/apache/uima/ee/test/flow/AdvancedFixedFlowController.java (original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/java/org/apache/uima/ee/test/flow/AdvancedFixedFlowController.java Thu Jan 22 09:01:14 2009
@@ -45,6 +45,7 @@
import java.util.Iterator;
import java.util.Set;
+import org.apache.uima.aae.error.MessageTimeoutException;
import org.apache.uima.analysis_engine.AnalysisEngineProcessException;
import org.apache.uima.analysis_engine.metadata.AnalysisEngineMetaData;
import org.apache.uima.cas.CAS;
@@ -76,6 +77,8 @@
private static final int ACTION_DROP_IF_NEW_CAS_PRODUCED = 3;
+ public static final String EXCEPTIONS_TO_IGNORE = "ExceptionsToIgnore";
+
private ArrayList mSequence;
private int mActionAfterCasMultiplier;
@@ -84,6 +87,8 @@
private boolean flowError;
+ private String[] exceptionsToIgnore;
+
public void initialize(FlowControllerContext aContext) throws ResourceInitializationException {
super.initialize(aContext);
@@ -116,6 +121,9 @@
throw new ResourceInitializationException(); // TODO
}
+ exceptionsToIgnore = (String[])aContext
+ .getConfigParameterValue(EXCEPTIONS_TO_IGNORE);
+
String[] aeKeysAllowingContinue = (String[])aContext
.getConfigParameterValue(PARAM_ALLOW_CONTINUE_ON_FAILURE);
if (aeKeysAllowingContinue != null) {
@@ -317,11 +325,11 @@
*/
public boolean continueOnFailure(String failedAeKey, Exception failure) {
// Check that root cause is an IndexOutOfBounds exception
- Throwable cause = failure.getCause();
+ Throwable cause = failure.getCause() == null ? failure : failure.getCause();
while (cause.getCause() != null) {
cause = cause.getCause();
}
- if (cause.getClass() != IndexOutOfBoundsException.class) {
+ if (cause.getClass() != IndexOutOfBoundsException.class && !ignoreException(cause)) {
System.out.println("FlowController.continueOnFailure - Invalid cause for delegate failure - expected "
+ IndexOutOfBoundsException.class + " - received "+ cause.getClass());
// Throwing an exception here doesn't stop flow!
@@ -329,5 +337,16 @@
}
return mAEsAllowingContinueOnFailure.contains(failedAeKey);
}
+
+ private boolean ignoreException(Throwable failure) {
+ if ( exceptionsToIgnore != null ) {
+ for( String exception: exceptionsToIgnore) {
+ if ( failure.getClass().getName().equals(exception)) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
}
}
Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/java/org/apache/uima/ee/test/utils/BaseTestSupport.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/java/org/apache/uima/ee/test/utils/BaseTestSupport.java?rev=736709&r1=736708&r2=736709&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/java/org/apache/uima/ee/test/utils/BaseTestSupport.java (original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/java/org/apache/uima/ee/test/utils/BaseTestSupport.java Thu Jan 22 09:01:14 2009
@@ -37,6 +37,7 @@
import org.apache.uima.aae.client.UimaASProcessStatusImpl;
import org.apache.uima.aae.client.UimaASStatusCallbackListener;
import org.apache.uima.aae.error.ServiceShutdownException;
+import org.apache.uima.aae.error.UimaASPingTimeout;
import org.apache.uima.aae.message.AsynchAEMessage;
import org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngine_impl;
import org.apache.uima.cas.CAS;
@@ -240,18 +241,21 @@
}
}
+ protected void runTestWithMultipleThreads(String serviceDeplyDescriptor, String queueName, int howManyCASesPerRunningThread, int howManyRunningThreads, int timeout, int aGetMetaTimeout) throws Exception {
+ runTestWithMultipleThreads(serviceDeplyDescriptor, queueName, howManyCASesPerRunningThread, howManyRunningThreads, timeout, aGetMetaTimeout,false);
+ }
- protected void runTestWithMultipleThreads(String serviceDeplyDescriptor, String queueName, int howManyCASesPerRunningThread, int howManyRunningThreads, int timeout) throws Exception
+ protected void runTestWithMultipleThreads(String serviceDeplyDescriptor, String queueName, int howManyCASesPerRunningThread, int howManyRunningThreads, int timeout, int aGetMetaTimeout, boolean failOnTimeout) throws Exception
{
- String[] containers = new String[1];
// Instantiate Uima EE Client
- BaseUIMAAsynchronousEngine_impl eeUimaEngine = new BaseUIMAAsynchronousEngine_impl();
+ final BaseUIMAAsynchronousEngine_impl eeUimaEngine = new BaseUIMAAsynchronousEngine_impl();
// Deploy Uima EE Primitive Service
- containers[0] = deployService(eeUimaEngine, serviceDeplyDescriptor);// "resources/deployment/Deploy_PersonTitleAnnotator.xml");
+ final String containerId = deployService(eeUimaEngine, serviceDeplyDescriptor);
Thread t1 = null;
Thread t2 = null;
- Map appCtx = buildContext(String.valueOf(broker.getMasterConnectorURI()), queueName, timeout); // "PersonTitleAnnotatorQueue"
- // );
+ Map appCtx = buildContext(String.valueOf(broker.getMasterConnectorURI()), queueName, timeout);
+ // Set an explicit getMeta (Ping)timeout
+ appCtx.put(UimaAsynchronousEngine.GetMetaTimeout, aGetMetaTimeout );
initialize(eeUimaEngine, appCtx);
@@ -262,6 +266,29 @@
// Wait until the CPC Thread is ready.
waitOnMonitor(ctrlMonitor);
+ if ( failOnTimeout ) {
+ // Spin a thread and wait for awhile before killing the remote service.
+ // This will cause the client to timeout waiting for a CAS reply and
+ // to send a Ping message to test service availability. The Ping times
+ // out and causes the client API to stop.
+ new Thread() {
+ public void run()
+ {
+ Object mux = new Object();
+ synchronized( mux ) {
+ try {
+ mux.wait(5000);
+ // Undeploy service container
+ eeUimaEngine.undeploy(containerId);
+ } catch (Exception e) {}
+ }
+ }
+ }.start();
+
+ }
+
+
+
// Spin runner threads and start sending CASes
for (int i = 0; i < howManyRunningThreads; i++)
{
@@ -642,15 +669,25 @@
*/
public void initializationComplete(EntityProcessStatus aStatus)
{
+ boolean isPingException;
+
if (aStatus != null && aStatus.isException())
{
System.out.println("Initialization Received Reply Containing Exception:");
List exceptions = aStatus.getExceptions();
for (int i = 0; i < exceptions.size(); i++)
{
+ if ( exceptions.get(i) instanceof UimaASPingTimeout ) {
+ System.out.println("Client Received PING Timeout. Service Not Available");
+ if (cpcLatch != null)
+ {
+ cpcLatch.countDown();
+ }
+
+ }
if ( !expectingServiceShutdownException )
{
- ((Throwable) exceptions.get(i)).printStackTrace();
+ ((Throwable) exceptions.get(i)).printStackTrace();
}
}
if (exceptionCountLatch != null)
Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/deployment/Deploy_AggregateAnnotatorWithLongDelayDelegate.xml
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/deployment/Deploy_AggregateAnnotatorWithLongDelayDelegate.xml?rev=736709&r1=736708&r2=736709&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/deployment/Deploy_AggregateAnnotatorWithLongDelayDelegate.xml (original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/deployment/Deploy_AggregateAnnotatorWithLongDelayDelegate.xml Thu Jan 22 09:01:14 2009
@@ -42,7 +42,7 @@
<inputQueue endpoint="NoOpAnnotatorQueueLongDelay" brokerURL="tcp://localhost:8118"/>
<serializer method="xmi"/>
<asyncAggregateErrorConfiguration>
- <getMetadataErrors maxRetries="0" timeout="0" errorAction="terminate"/>
+ <getMetadataErrors maxRetries="0" timeout="2000" errorAction="disable"/>
<processCasErrors maxRetries="1" timeout="4000" continueOnRetryFailure="false" thresholdCount="0" thresholdWindow="0" thresholdAction="terminate"/>
<collectionProcessCompleteErrors timeout="0" additionalErrorAction="terminate"/>
</asyncAggregateErrorConfiguration>
Added: incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/deployment/Deploy_MeetingDetectorAggregate.xml
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/deployment/Deploy_MeetingDetectorAggregate.xml?rev=736709&view=auto
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/deployment/Deploy_MeetingDetectorAggregate.xml (added)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/deployment/Deploy_MeetingDetectorAggregate.xml Thu Jan 22 09:01:14 2009
@@ -0,0 +1,48 @@
+<?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>Room Number Annotator</name>
+ <description>Deploys Meeting Detector Aggregate Annotator Primitive AE</description>
+
+ <deployment protocol="jms" provider="activemq">
+ <casPool numberOfCASes="5"/>
+ <service>
+ <inputQueue endpoint="MeetingDetectorQueue" brokerURL="tcp://localhost:8118" prefetch="1"/>
+ <topDescriptor>
+ <import location="../descriptors/tutorial/ex4/MeetingDetectorTAE.xml"/>
+ </topDescriptor>
+ <analysisEngine>
+ <asyncPrimitiveErrorConfiguration>
+ <!-- <processCasErrors thresholdCount="4" thresholdWindow="10" thresholdAction="terminate" /> -->
+ <collectionProcessCompleteErrors additionalErrorAction="terminate" />
+ </asyncPrimitiveErrorConfiguration>
+ </analysisEngine>
+
+
+ </service>
+ </deployment>
+
+</analysisEngineDeploymentDescription>
Added: incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/deployment/Deploy_MeetingDetectorTAEWithCM_RemoteRoomNumberDisable.xml
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/deployment/Deploy_MeetingDetectorTAEWithCM_RemoteRoomNumberDisable.xml?rev=736709&view=auto
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/deployment/Deploy_MeetingDetectorTAEWithCM_RemoteRoomNumberDisable.xml (added)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/deployment/Deploy_MeetingDetectorTAEWithCM_RemoteRoomNumberDisable.xml Thu Jan 22 09:01:14 2009
@@ -0,0 +1,58 @@
+<?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>
+ <description>Deploys Meeting Detector Aggregate AE that uses remotely deployed RoomNumberAnnotator.</description>
+
+ <deployment protocol="jms" provider="activemq">
+ <casPool numberOfCASes="5"/>
+ <service>
+ <inputQueue endpoint="MeetingDetectorTaeQueue" brokerURL="tcp://localhost:8118"/>
+ <topDescriptor>
+ <import location="../descriptors/tutorial/ex4/MeetingDetectorTAEWithCMContinueOnError.xml"/>
+ </topDescriptor>
+ <analysisEngine>
+ <delegates>
+
+ <analysisEngine key="TestMultiplier">
+ <casMultiplier poolSize="5"/>
+ </analysisEngine>
+
+ <remoteAnalysisEngine key="RoomNumber">
+ <inputQueue endpoint="RoomNumberAnnotatorQueue" brokerURL="tcp://localhost:8118"/>
+ <serializer method="xmi"/>
+ <asyncAggregateErrorConfiguration>
+ <getMetadataErrors maxRetries="0" timeout="1000" errorAction="disable"/>
+ <processCasErrors maxRetries="0" timeout="1000" continueOnRetryFailure="true" thresholdCount="1" thresholdWindow="0" thresholdAction="disable"/>
+ <collectionProcessCompleteErrors timeout="0" additionalErrorAction="terminate"/>
+ </asyncAggregateErrorConfiguration>
+
+ </remoteAnalysisEngine>
+ </delegates>
+ </analysisEngine>
+ </service>
+ </deployment>
+
+</analysisEngineDeploymentDescription>
\ No newline at end of file
Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/deployment/Deploy_MeetingDetectorTAE_RemoteRoomNumber.xml
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/deployment/Deploy_MeetingDetectorTAE_RemoteRoomNumber.xml?rev=736709&r1=736708&r2=736709&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/deployment/Deploy_MeetingDetectorTAE_RemoteRoomNumber.xml (original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/deployment/Deploy_MeetingDetectorTAE_RemoteRoomNumber.xml Thu Jan 22 09:01:14 2009
@@ -38,6 +38,12 @@
<remoteAnalysisEngine key="RoomNumber">
<inputQueue endpoint="RoomNumberAnnotatorQueue" brokerURL="tcp://localhost:8118"/>
<serializer method="xmi"/>
+ <asyncAggregateErrorConfiguration>
+ <getMetadataErrors maxRetries="0" timeout="1000" errorAction="disable"/>
+ <processCasErrors maxRetries="0" timeout="1000" continueOnRetryFailure="true" thresholdCount="1" thresholdWindow="0" thresholdAction="disable"/>
+ <collectionProcessCompleteErrors timeout="0" additionalErrorAction="terminate"/>
+ </asyncAggregateErrorConfiguration>
+
</remoteAnalysisEngine>
</delegates>
</analysisEngine>
Added: incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/deployment/Deploy_MeetingDetectorTAE_RemoteRoomNumberDisable.xml
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/deployment/Deploy_MeetingDetectorTAE_RemoteRoomNumberDisable.xml?rev=736709&view=auto
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/deployment/Deploy_MeetingDetectorTAE_RemoteRoomNumberDisable.xml (added)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/deployment/Deploy_MeetingDetectorTAE_RemoteRoomNumberDisable.xml Thu Jan 22 09:01:14 2009
@@ -0,0 +1,53 @@
+<?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>
+ <description>Deploys Meeting Detector Aggregate AE that uses remotely deployed RoomNumberAnnotator.</description>
+
+ <deployment protocol="jms" provider="activemq">
+ <casPool numberOfCASes="5"/>
+ <service>
+ <inputQueue endpoint="MeetingDetectorTaeQueue" brokerURL="tcp://localhost:8118"/>
+ <topDescriptor>
+ <import location="../descriptors/tutorial/ex4/MeetingDetectorTAEContinueOnError.xml"/>
+ </topDescriptor>
+ <analysisEngine>
+ <delegates>
+ <remoteAnalysisEngine key="RoomNumber">
+ <inputQueue endpoint="RoomNumberAnnotatorQueue" brokerURL="tcp://localhost:8118"/>
+ <serializer method="xmi"/>
+ <asyncAggregateErrorConfiguration>
+ <getMetadataErrors maxRetries="0" timeout="1000" errorAction="disable"/>
+ <processCasErrors maxRetries="0" timeout="1000" continueOnRetryFailure="true" thresholdCount="1" thresholdWindow="0" thresholdAction="disable"/>
+ <collectionProcessCompleteErrors timeout="0" additionalErrorAction="terminate"/>
+ </asyncAggregateErrorConfiguration>
+
+ </remoteAnalysisEngine>
+ </delegates>
+ </analysisEngine>
+ </service>
+ </deployment>
+
+</analysisEngineDeploymentDescription>
\ No newline at end of file
Added: incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/descriptors/analysis_engine/NoOpAnnotatorExpecting1000Cases.xml
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/descriptors/analysis_engine/NoOpAnnotatorExpecting1000Cases.xml?rev=736709&view=auto
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/descriptors/analysis_engine/NoOpAnnotatorExpecting1000Cases.xml (added)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/descriptors/analysis_engine/NoOpAnnotatorExpecting1000Cases.xml Thu Jan 22 09:01:14 2009
@@ -0,0 +1,97 @@
+<?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.
+ ***************************************************************
+ -->
+<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
+ <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
+ <primitive>true</primitive>
+ <annotatorImplementationName>org.apache.uima.ae.noop.NoOpAnnotator</annotatorImplementationName>
+ <analysisEngineMetaData>
+ <name>NoOp Annotator</name>
+ <description>Annotator That Does Nothin</description>
+ <version>1.0</version>
+ <vendor>The Apache Software Foundation</vendor>
+
+ <configurationParameters>
+ <configurationParameter>
+ <name>ErrorFrequency</name>
+ <description>Frequency of Generated Errors</description>
+ <type>Integer</type>
+ <multiValued>false</multiValued>
+ <mandatory>true</mandatory>
+ </configurationParameter>
+
+ <configurationParameter>
+ <name>ProcessDelay</name>
+ <description>Process Delay</description>
+ <type>Integer</type>
+ <multiValued>false</multiValued>
+ <mandatory>true</mandatory>
+ </configurationParameter>
+
+ <configurationParameter>
+ <name>FinalCount</name>
+ <description>Total number of CASes that should be processed before CPC</description>
+ <type>Integer</type>
+ <multiValued>false</multiValued>
+ <mandatory>false</mandatory>
+ </configurationParameter>
+
+ </configurationParameters>
+
+ <configurationParameterSettings>
+ <nameValuePair>
+ <name>ErrorFrequency</name>
+ <value>
+ <integer>0</integer>
+ </value>
+ </nameValuePair>
+
+ <nameValuePair>
+ <name>ProcessDelay</name>
+ <value>
+ <integer>0</integer>
+ </value>
+ </nameValuePair>
+
+ <nameValuePair>
+ <name>FinalCount</name>
+ <value>
+ <integer>1000</integer>
+ </value>
+ </nameValuePair>
+
+ </configurationParameterSettings>
+
+
+
+ <typeSystemDescription>
+ </typeSystemDescription>
+
+ <capabilities>
+ </capabilities>
+
+ <operationalProperties>
+ <modifiesCas>true</modifiesCas>
+ <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
+ <outputsNewCASes>false</outputsNewCASes>
+ </operationalProperties>
+ </analysisEngineMetaData>
+</analysisEngineDescription>
Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/descriptors/analysis_engine/SimpleTestAggregateWithParallelFlow.xml
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/descriptors/analysis_engine/SimpleTestAggregateWithParallelFlow.xml?rev=736709&r1=736708&r2=736709&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/descriptors/analysis_engine/SimpleTestAggregateWithParallelFlow.xml (original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/descriptors/analysis_engine/SimpleTestAggregateWithParallelFlow.xml Thu Jan 22 09:01:14 2009
@@ -71,6 +71,19 @@
<parameter>FlowController/AllowContinueOnFailure</parameter>
</overrides>
</configurationParameter>
+
+ <configurationParameter>
+ <name>ExceptionsToIgnore</name>
+ <description>Specifies which exceptions to ignore.</description>
+ <type>String</type>
+ <multiValued>true</multiValued>
+ <mandatory>false</mandatory>
+ <overrides>
+ <parameter>FlowController/ExceptionsToIgnore</parameter>
+ </overrides>
+ </configurationParameter>
+
+
</configurationParameters>
<configurationParameterSettings>
@@ -94,6 +107,16 @@
</array>
</value>
</nameValuePair>
+
+ <nameValuePair>
+ <name>ExceptionsToIgnore</name>
+ <value>
+ <array>
+ <string>org.apache.uima.aae.error.MessageTimeoutException</string>
+ </array>
+ </value>
+ </nameValuePair>
+
</configurationParameterSettings>
<flowConstraints>
@@ -103,6 +126,7 @@
<node>NoOp1</node>
</fixedFlow>
</flowConstraints>
+
<capabilities>
<capability>
<inputs/>
Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/descriptors/analysis_engine/SimpleTestAggregateWithParallelFlows.xml
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/descriptors/analysis_engine/SimpleTestAggregateWithParallelFlows.xml?rev=736709&r1=736708&r2=736709&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/descriptors/analysis_engine/SimpleTestAggregateWithParallelFlows.xml (original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/descriptors/analysis_engine/SimpleTestAggregateWithParallelFlows.xml Thu Jan 22 09:01:14 2009
@@ -79,8 +79,22 @@
<parameter>FlowController/AllowContinueOnFailure</parameter>
</overrides>
</configurationParameter>
+
+ <configurationParameter>
+ <name>ExceptionsToIgnore</name>
+ <description>Specifies which exceptions to ignore.</description>
+ <type>String</type>
+ <multiValued>true</multiValued>
+ <mandatory>false</mandatory>
+ <overrides>
+ <parameter>FlowController/ExceptionsToIgnore</parameter>
+ </overrides>
+ </configurationParameter>
+
</configurationParameters>
+
+
<configurationParameterSettings>
<!-- This specifies the flow -->
<nameValuePair>
@@ -105,6 +119,16 @@
</array>
</value>
</nameValuePair>
+
+ <nameValuePair>
+ <name>ExceptionsToIgnore</name>
+ <value>
+ <array>
+ <string>org.apache.uima.aae.error.MessageTimeoutException</string>
+ </array>
+ </value>
+ </nameValuePair>
+
</configurationParameterSettings>
<flowConstraints>
Added: incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/descriptors/tutorial/ex4/MeetingDetectorTAEContinueOnError.xml
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/descriptors/tutorial/ex4/MeetingDetectorTAEContinueOnError.xml?rev=736709&view=auto
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/descriptors/tutorial/ex4/MeetingDetectorTAEContinueOnError.xml (added)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/descriptors/tutorial/ex4/MeetingDetectorTAEContinueOnError.xml Thu Jan 22 09:01:14 2009
@@ -0,0 +1,156 @@
+<?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.
+ ***************************************************************
+ -->
+
+<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
+ <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
+ <primitive>false</primitive>
+
+ <delegateAnalysisEngineSpecifiers>
+ <delegateAnalysisEngine key="RoomNumber">
+ <import location="../ex2/RoomNumberAnnotator.xml" />
+ </delegateAnalysisEngine>
+
+ <delegateAnalysisEngine key="DateTime">
+ <import location="../ex3/TutorialDateTime.xml" />
+ </delegateAnalysisEngine>
+
+ <delegateAnalysisEngine key="Meeting">
+ <import location="MeetingAnnotator.xml" />
+ </delegateAnalysisEngine>
+ </delegateAnalysisEngineSpecifiers>
+
+ <flowController key="FlowController">
+ <import location="../../flow/AdvancedFixedFlowController.xml" />
+ </flowController>
+
+ <analysisEngineMetaData>
+ <name>Meeting Detector TAE</name>
+ <description>Detects Room Numbers, Times, and Dates in text, and annotates the
+ combination of all three as a meeting.</description>
+
+ <configurationParameters>
+ <configurationParameter>
+ <name>Flow</name>
+ <description> Specifies the flow. This is an array of strings where each string is either a single Analysis
+ Engine key or a comma-separated list of Analysis Engine keys that should be executed in parallel.
+ </description>
+ <type>String</type>
+ <multiValued>true</multiValued>
+ <mandatory>true</mandatory>
+ <overrides>
+ <parameter>FlowController/Flow</parameter>
+ </overrides>
+ </configurationParameter>
+
+ <configurationParameter>
+ <name>AllowContinueOnFailure</name>
+ <description>Specifies for which AnalysisEngines the Flow should continue when an exception occurs.</description>
+ <type>String</type>
+ <multiValued>true</multiValued>
+ <mandatory>false</mandatory>
+ <overrides>
+ <parameter>FlowController/AllowContinueOnFailure</parameter>
+ </overrides>
+ </configurationParameter>
+
+ <configurationParameter>
+ <name>ExceptionsToIgnore</name>
+ <description>Specifies which exceptions to ignore.</description>
+ <type>String</type>
+ <multiValued>true</multiValued>
+ <mandatory>false</mandatory>
+ <overrides>
+ <parameter>FlowController/ExceptionsToIgnore</parameter>
+ </overrides>
+ </configurationParameter>
+
+ </configurationParameters>
+
+ <configurationParameterSettings>
+ <!-- This specifies the flow -->
+ <nameValuePair>
+ <name>Flow</name>
+ <value>
+ <array>
+ <string>RoomNumber</string>
+ <string>DateTime</string>
+ <string>Meeting</string>
+ </array>
+ </value>
+ </nameValuePair>
+
+ <nameValuePair>
+ <name>AllowContinueOnFailure</name>
+ <value>
+ <array>
+ <string>RoomNumber</string>
+ </array>
+ </value>
+ </nameValuePair>
+
+ <nameValuePair>
+ <name>ExceptionsToIgnore</name>
+ <value>
+ <array>
+ <string>org.apache.uima.aae.error.MessageTimeoutException</string>
+ </array>
+ </value>
+ </nameValuePair>
+
+ </configurationParameterSettings>
+
+
+ <flowConstraints>
+ <fixedFlow>
+ <node>RoomNumber</node>
+ <node>DateTime</node>
+ <node>Meeting</node>
+ </fixedFlow>
+ </flowConstraints>
+
+
+ <capabilities>
+ <capability>
+ <inputs/>
+ <outputs>
+ <type allAnnotatorFeatures="true">
+ org.apache.uima.tutorial.Meeting</type>
+ <type allAnnotatorFeatures="true">
+ org.apache.uima.tutorial.RoomNumber</type>
+ <type allAnnotatorFeatures="true">
+ org.apache.uima.tutorial.DateAnnot</type>
+ <type allAnnotatorFeatures="true">
+ org.apache.uima.tutorial.TimeAnnot</type>
+ </outputs>
+ <languagesSupported>
+ <language>en</language>
+ </languagesSupported>
+ </capability>
+ </capabilities>
+ <operationalProperties>
+ <modifiesCas>true</modifiesCas>
+ <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
+ <outputsNewCASes>false</outputsNewCASes>
+ </operationalProperties>
+ </analysisEngineMetaData>
+</analysisEngineDescription>
Added: incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/descriptors/tutorial/ex4/MeetingDetectorTAEWithCMContinueOnError.xml
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/descriptors/tutorial/ex4/MeetingDetectorTAEWithCMContinueOnError.xml?rev=736709&view=auto
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/descriptors/tutorial/ex4/MeetingDetectorTAEWithCMContinueOnError.xml (added)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/resources/descriptors/tutorial/ex4/MeetingDetectorTAEWithCMContinueOnError.xml Thu Jan 22 09:01:14 2009
@@ -0,0 +1,171 @@
+<?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.
+ ***************************************************************
+ -->
+
+<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
+ <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
+ <primitive>false</primitive>
+
+ <delegateAnalysisEngineSpecifiers>
+
+
+ <delegateAnalysisEngine key="TestMultiplier">
+ <import location="../../multiplier/SimpleCasGeneratorProducing1000Cases.xml" />
+ </delegateAnalysisEngine>
+
+ <delegateAnalysisEngine key="RoomNumber">
+ <import location="../ex2/RoomNumberAnnotator.xml" />
+ </delegateAnalysisEngine>
+
+ <delegateAnalysisEngine key="DateTime">
+ <import location="../ex3/TutorialDateTime.xml" />
+ </delegateAnalysisEngine>
+
+ <delegateAnalysisEngine key="Meeting">
+ <import location="MeetingAnnotator.xml" />
+ </delegateAnalysisEngine>
+
+ <delegateAnalysisEngine key="NoOp">
+ <import location="../../analysis_engine/NoOpAnnotatorExpecting1000Cases.xml" />
+ </delegateAnalysisEngine>
+
+ </delegateAnalysisEngineSpecifiers>
+
+ <flowController key="FlowController">
+ <import location="../../flow/AdvancedFixedFlowController.xml" />
+ </flowController>
+
+ <analysisEngineMetaData>
+ <name>Meeting Detector TAE</name>
+ <description>Detects Room Numbers, Times, and Dates in text, and annotates the
+ combination of all three as a meeting.</description>
+
+ <configurationParameters>
+ <configurationParameter>
+ <name>Flow</name>
+ <description> Specifies the flow. This is an array of strings where each string is either a single Analysis
+ Engine key or a comma-separated list of Analysis Engine keys that should be executed in parallel.
+ </description>
+ <type>String</type>
+ <multiValued>true</multiValued>
+ <mandatory>true</mandatory>
+ <overrides>
+ <parameter>FlowController/Flow</parameter>
+ </overrides>
+ </configurationParameter>
+
+ <configurationParameter>
+ <name>AllowContinueOnFailure</name>
+ <description>Specifies for which AnalysisEngines the Flow should continue when an exception occurs.</description>
+ <type>String</type>
+ <multiValued>true</multiValued>
+ <mandatory>false</mandatory>
+ <overrides>
+ <parameter>FlowController/AllowContinueOnFailure</parameter>
+ </overrides>
+ </configurationParameter>
+
+ <configurationParameter>
+ <name>ExceptionsToIgnore</name>
+ <description>Specifies which exceptions to ignore.</description>
+ <type>String</type>
+ <multiValued>true</multiValued>
+ <mandatory>false</mandatory>
+ <overrides>
+ <parameter>FlowController/ExceptionsToIgnore</parameter>
+ </overrides>
+ </configurationParameter>
+
+ </configurationParameters>
+
+ <configurationParameterSettings>
+ <!-- This specifies the flow -->
+ <nameValuePair>
+ <name>Flow</name>
+ <value>
+ <array>
+ <string>TestMultiplier</string>
+ <string>RoomNumber</string>
+ <string>DateTime</string>
+ <string>Meeting</string>
+ <string>NoOp</string>
+ </array>
+ </value>
+ </nameValuePair>
+
+ <nameValuePair>
+ <name>AllowContinueOnFailure</name>
+ <value>
+ <array>
+ <string>RoomNumber</string>
+ </array>
+ </value>
+ </nameValuePair>
+
+ <nameValuePair>
+ <name>ExceptionsToIgnore</name>
+ <value>
+ <array>
+ <string>org.apache.uima.aae.error.MessageTimeoutException</string>
+ </array>
+ </value>
+ </nameValuePair>
+
+ </configurationParameterSettings>
+
+
+ <flowConstraints>
+ <fixedFlow>
+ <node>TestMultiplier</node>
+ <node>RoomNumber</node>
+ <node>DateTime</node>
+ <node>Meeting</node>
+ <node>NoOp</node>
+ </fixedFlow>
+ </flowConstraints>
+
+
+ <capabilities>
+ <capability>
+ <inputs/>
+ <outputs>
+ <type allAnnotatorFeatures="true">
+ org.apache.uima.tutorial.Meeting</type>
+ <type allAnnotatorFeatures="true">
+ org.apache.uima.tutorial.RoomNumber</type>
+ <type allAnnotatorFeatures="true">
+ org.apache.uima.tutorial.DateAnnot</type>
+ <type allAnnotatorFeatures="true">
+ org.apache.uima.tutorial.TimeAnnot</type>
+ </outputs>
+ <languagesSupported>
+ <language>en</language>
+ </languagesSupported>
+ </capability>
+ </capabilities>
+ <operationalProperties>
+ <modifiesCas>true</modifiesCas>
+ <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
+ <outputsNewCASes>false</outputsNewCASes>
+ </operationalProperties>
+ </analysisEngineMetaData>
+</analysisEngineDescription>