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 2013/11/05 17:40:27 UTC

svn commit: r1539052 - /uima/uima-as/trunk/uimaj-as-activemq/src/main/java/org/apache/uima/examples/as/RunRemoteAsyncAE.java

Author: cwiklik
Date: Tue Nov  5 16:40:27 2013
New Revision: 1539052

URL: http://svn.apache.org/r1539052
Log:
UIMA-3406 terminated process if on exception during processing

Modified:
    uima/uima-as/trunk/uimaj-as-activemq/src/main/java/org/apache/uima/examples/as/RunRemoteAsyncAE.java

Modified: uima/uima-as/trunk/uimaj-as-activemq/src/main/java/org/apache/uima/examples/as/RunRemoteAsyncAE.java
URL: http://svn.apache.org/viewvc/uima/uima-as/trunk/uimaj-as-activemq/src/main/java/org/apache/uima/examples/as/RunRemoteAsyncAE.java?rev=1539052&r1=1539051&r2=1539052&view=diff
==============================================================================
--- uima/uima-as/trunk/uimaj-as-activemq/src/main/java/org/apache/uima/examples/as/RunRemoteAsyncAE.java (original)
+++ uima/uima-as/trunk/uimaj-as-activemq/src/main/java/org/apache/uima/examples/as/RunRemoteAsyncAE.java Tue Nov  5 16:40:27 2013
@@ -244,24 +244,26 @@ public class RunRemoteAsyncAE {
     if (logCas) {
       System.out.println("\nService-IPaddr\tSent\tDuration");
     }
-    if (collectionReaderDescriptor != null) {
-      uimaEEEngine.process();
-    } else {
-      // send an empty CAS
-      CAS cas = uimaEEEngine.getCAS();
-      uimaEEEngine.sendCAS(cas);
-      uimaEEEngine.collectionProcessingComplete();
-    }
+    try {
+      if (collectionReaderDescriptor != null) {
+        uimaEEEngine.process();
+      } else {
+        // send an empty CAS
+        CAS cas = uimaEEEngine.getCAS();
+        uimaEEEngine.sendCAS(cas);
+        uimaEEEngine.collectionProcessingComplete();
+      }
       // If running with -d (deploy) option, the service must be 
       // first be undeployed before stop() is called. Otherwise,
       // this process hangs
       if ( springContainerId != null ) {
         uimaEEEngine.undeploy(springContainerId);
       }
-    try {
+
       uimaEEEngine.stop();
     } catch( Exception e) {
-      
+      e.printStackTrace();
+      Runtime.getRuntime().halt(-1);
     }
     System.exit(0);
   }