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 2014/03/27 18:11:33 UTC

svn commit: r1582406 - /uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/main/java/org/apache/uima/ducc/common/main/DuccService.java

Author: cwiklik
Date: Thu Mar 27 17:11:33 2014
New Revision: 1582406

URL: http://svn.apache.org/r1582406
Log:
UIMA-3698 Removed ShutdownHook. There is already one in the AbstractDuccComponent

Modified:
    uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/main/java/org/apache/uima/ducc/common/main/DuccService.java

Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/main/java/org/apache/uima/ducc/common/main/DuccService.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/main/java/org/apache/uima/ducc/common/main/DuccService.java?rev=1582406&r1=1582405&r2=1582406&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/main/java/org/apache/uima/ducc/common/main/DuccService.java (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/main/java/org/apache/uima/ducc/common/main/DuccService.java Thu Mar 27 17:11:33 2014
@@ -143,25 +143,6 @@ public class DuccService extends Abstrac
 			logger.info(methodName, null, "... Component started: ", duccComponent.getKey());
 		}
 		
-		Runtime.getRuntime().addShutdownHook( 
-            new Thread(
-                    new Runnable() {
-                            public void run() {
-                                    System.out.println( "Shutdown hook running" );
-                                    for(Map.Entry<String, AbstractDuccComponent> duccComponent: duccComponents.entrySet()) {
-                                      try {
-                                        duccComponent.getValue().stop();
-                                      } catch ( Exception e) {
-                                        logger.warn("ShutdownHook.run", null, e);
-                                      }
-                                      logger.info("ShutdownHook.run", null, "... Stopping Component: ", duccComponent.getKey());
-                                    }
-                            }       
-                    }
-            )
-    );
-		
-		
     // run until you terminate the JVM
     logger.info(methodName, null, "Starting Camel. Use ctrl + c to terminate the JVM.\n");
     main.run();