[jboss-cvs] JBossAS SVN: r58965 - trunk/system/src/main/org/jboss/system/server/profileservice

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sun Dec 10 20:01:04 EST 2006


Author: scott.stark at jboss.org
Date: 2006-12-10 20:01:03 -0500 (Sun, 10 Dec 2006)
New Revision: 58965

Modified:
   trunk/system/src/main/org/jboss/system/server/profileservice/ServerImpl.java
Log:
JBAS-3560, move the jdk log manager reset to shutdown and update the shutdown logging

Modified: trunk/system/src/main/org/jboss/system/server/profileservice/ServerImpl.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profileservice/ServerImpl.java	2006-12-11 00:59:14 UTC (rev 58964)
+++ trunk/system/src/main/org/jboss/system/server/profileservice/ServerImpl.java	2006-12-11 01:01:03 UTC (rev 58965)
@@ -26,6 +26,7 @@
 import java.net.URL;
 import java.util.Date;
 import java.util.Properties;
+import java.util.logging.LogManager;
 
 import javax.management.Notification;
 import javax.management.NotificationBroadcasterSupport;
@@ -37,6 +38,7 @@
 import org.jboss.kernel.plugins.deployment.BasicKernelDeployer;
 import org.jboss.kernel.spi.event.KernelEvent;
 import org.jboss.logging.Logger;
+import org.jboss.logging.jdk.JBossJDKLogManager;
 import org.jboss.net.protocol.URLStreamHandlerFactory;
 import org.jboss.system.server.Server;
 import org.jboss.system.server.ServerConfig;
@@ -457,10 +459,12 @@
 
       if (exitOnShutdown)
       {
+         log.debug("Calling server.exit(0)");
          server.exit(0);
       }
       else if (blockingShutdown)
       {
+         log.debug("Invoking shutdownHook in calling thread");
          shutdownHook.shutdown();
       } // end of if ()
       else
@@ -473,6 +477,7 @@
             {
                // just run the hook, don't call System.exit, as we may
                // be embeded in a vm that would not like that very much
+               log.debug("Invoking shutdownHook in background thread");
                shutdownHook.shutdown();
             }
          }.start();
@@ -715,6 +720,17 @@
       {
          // Send a notification that mbeanServer stop is initiated
          log.info("JBoss SHUTDOWN");
+         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();
+         } 
+
          Notification msg = new Notification(Server.STOP_NOTIFICATION_TYPE, this, 2);
          sendNotification(msg);
          log.info("Undeploying all packages");




More information about the jboss-cvs-commits mailing list