Author: cwiklik
Date: Fri Oct 25 17:07:50 2013
New Revision: 1535785

URL: http://svn.apache.org/r1535785
Log:
UIMA-3383 Modified to exit process on ContextStoppedEvent. This event is sent 
by Spring when it stops the container

Modified:
    
uima/uima-as/trunk/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/service/UIMA_Service.java

Modified: 
uima/uima-as/trunk/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/service/UIMA_Service.java
URL: 
http://svn.apache.org/viewvc/uima/uima-as/trunk/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/service/UIMA_Service.java?rev=1535785&r1=1535784&r2=1535785&view=diff
==============================================================================
--- 
uima/uima-as/trunk/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/service/UIMA_Service.java
 (original)
+++ 
uima/uima-as/trunk/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/service/UIMA_Service.java
 Fri Oct 25 17:07:50 2013
@@ -42,6 +42,7 @@ import org.apache.uima.util.Level;
 import org.springframework.context.ApplicationEvent;
 import org.springframework.context.ApplicationListener;
 import org.springframework.context.event.ContextClosedEvent;
+import org.springframework.context.event.ContextStoppedEvent;
 import org.springframework.context.support.FileSystemXmlApplicationContext;
 
 public class UIMA_Service implements ApplicationListener {
@@ -392,9 +393,9 @@ public class UIMA_Service implements App
       // Stop the monitor. The service has stopped
       monitor.doStop();
     } else if ( event instanceof UimaASApplicationExitEvent ) {
-       System.out.println("!!!!!!!!!!! Service Wrapper Received 
UimaASApplicationEvent. Message:"+event.getSource());
-    } else {
-       System.out.println("............ Received Notification of 
type:"+event.getClass().getName());
+       System.out.println("Service Wrapper Received UimaASApplicationEvent. 
Message:"+event.getSource());
+    } else if ( event instanceof ContextStoppedEvent ){ // Spring has been 
shutdown
+       System.exit(0);
     }
   }
 


Reply via email to