geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r443157 - in /geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main: ClientCommandLine.java CommandLine.java
Date Wed, 13 Sep 2006 22:54:19 GMT
Author: djencks
Date: Wed Sep 13 15:54:18 2006
New Revision: 443157

URL: http://svn.apache.org/viewvc?view=rev&rev=443157
Log:
GERONIMO-2405 fix the app client container for running swing app clients by using a shutdown
hook

Modified:
    geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/ClientCommandLine.java
    geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/CommandLine.java

Modified: geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/ClientCommandLine.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/ClientCommandLine.java?view=diff&rev=443157&r1=443156&r2=443157
==============================================================================
--- geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/ClientCommandLine.java
(original)
+++ geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/ClientCommandLine.java
Wed Sep 13 15:54:18 2006
@@ -47,8 +47,6 @@
             String[] clientArgs = new String[args.length -1];
             System.arraycopy(args, 1, clientArgs, 0, clientArgs.length);
             new ClientCommandLine(configuration, clientArgs);
-
-            log.info("Client shutdown completed");
         } catch (Exception e) {
             ExceptionUtil.trimStackTrace(e);
             e.printStackTrace();

Modified: geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/CommandLine.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/CommandLine.java?view=diff&rev=443157&r1=443156&r2=443157
==============================================================================
--- geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/CommandLine.java
(original)
+++ geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/CommandLine.java
Wed Sep 13 15:54:18 2006
@@ -89,6 +89,16 @@
 
     public void invokeMainGBean(List configurations, AbstractNameQuery mainGBeanQuery, String
mainMethod, String[] args) throws Exception {
         startKernel();
+        Runtime.getRuntime().addShutdownHook(new Thread("Geronimo shutdown thread") {
+            public void run() {
+                log.info("Server shutdown begun");
+                try {
+                    stopKernel();
+                } catch (GBeanNotFoundException e) {
+
+                }
+            }
+        });
         loadConfigurations(configurations);
 
         log.info("Server startup completed");
@@ -108,9 +118,6 @@
                 new Object[]{args},
                 new String[]{String[].class.getName()});
 
-        log.info("Server shutdown begun");
-
-        stopKernel();
     }
 
     protected void startKernel() throws Exception {



Mime
View raw message