[jboss-cvs] JBossAS SVN: r58963 - trunk/system-jmx/src/main/org/jboss/system/server/jmx

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sun Dec 10 19:58:28 EST 2006


Author: scott.stark at jboss.org
Date: 2006-12-10 19:58:26 -0500 (Sun, 10 Dec 2006)
New Revision: 58963

Modified:
   trunk/system-jmx/src/main/org/jboss/system/server/jmx/JMXKernel.java
Log:
JBAS-3560, the jmx kernel must delegate shutdown to the injected serverImpl.

Modified: trunk/system-jmx/src/main/org/jboss/system/server/jmx/JMXKernel.java
===================================================================
--- trunk/system-jmx/src/main/org/jboss/system/server/jmx/JMXKernel.java	2006-12-10 23:43:41 UTC (rev 58962)
+++ trunk/system-jmx/src/main/org/jboss/system/server/jmx/JMXKernel.java	2006-12-11 00:58:26 UTC (rev 58963)
@@ -199,17 +199,11 @@
          throw new IllegalStateException("Server not started");
 
       isInShutdown = true;
-      // start in new thread to give positive
-      // feedback to requesting client of success.
-      new Thread()
-      {
-         public void run()
-         {
-            // just run the hook, don't call System.exit, as we may
-            // be embeded in a vm that would not like that very much
-            shutdown();
-         }
-      }.start();
+      log.debug("Shutting down all services");
+      shutdownServices();
+
+      // Make sure all mbeans are unregistered
+      removeMBeans();
    }
 
    ///////////////////////////////////////////////////////////////////////////
@@ -341,33 +335,7 @@
    {
       if (log.isTraceEnabled())
          log.trace("Shutdown caller:", new Throwable("Here"));
-      
-      // Execute the jdk JBossJDKLogManager doReset
-      LogManager lm = LogManager.getLogManager();
-      if (lm instanceof JBossJDKLogManager)
-      {
-         JBossJDKLogManager jbosslm = (JBossJDKLogManager)lm;
-         jbosslm.doReset();
-      } 
-
-      // avoid entering twice; may happen when called directly
-      // from ServerImpl.shutdown(), then called again when all
-      // non-daemon threads have exited and the ShutdownHook runs. 
-      if (isInShutdown)
-         return;
-      else
-         isInShutdown = true;
-      
-      // ServiceController.shutdown()
-      log.debug("Shutting down all services");
-      shutdownServices();
-
-      // Make sure all mbeans are unregistered
-      removeMBeans();
-
-      // Done
-      log.info("Legacy kernel shutdown complete");
-      System.out.println("Legacy kernel shutdown complete");
+      serverImpl.shutdown();
    }
 
    /**




More information about the jboss-cvs-commits mailing list