[jboss-cvs] JBossAS SVN: r58721 - tags/JBoss_4_0_3_SP1_CP03/system/src/main/org/jboss/system/server

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Nov 29 01:24:53 EST 2006


Author: vicky.kak at jboss.com
Date: 2006-11-29 01:24:50 -0500 (Wed, 29 Nov 2006)
New Revision: 58721

Modified:
   tags/JBoss_4_0_3_SP1_CP03/system/src/main/org/jboss/system/server/ServerImpl.java
Log:
Update for ASPATCH-124

Modified: tags/JBoss_4_0_3_SP1_CP03/system/src/main/org/jboss/system/server/ServerImpl.java
===================================================================
--- tags/JBoss_4_0_3_SP1_CP03/system/src/main/org/jboss/system/server/ServerImpl.java	2006-11-29 06:24:30 UTC (rev 58720)
+++ tags/JBoss_4_0_3_SP1_CP03/system/src/main/org/jboss/system/server/ServerImpl.java	2006-11-29 06:24:50 UTC (rev 58721)
@@ -100,6 +100,9 @@
    /** The bootstrap UCL class loader ObjectName */
    private ObjectName bootstrapUCLName;
 
+   /** A flag indicating if shutdown has been called */
+   private boolean isInShutdown;
+   
    /**
     * No-arg constructor for {@link ServerLoader}.
     */
@@ -304,6 +307,15 @@
    }
 
    /**
+    * Check if the shutdown operation has been called/is in progress.
+    *
+    * @return true if shutdown has been called, false otherwise
+	*/
+    public boolean isInShutdown()
+    {
+	  return isInShutdown;
+    }
+   /**
     * Start the Server instance.
     *
     * @throws IllegalStateException    Already started or not initialized.
@@ -620,7 +632,8 @@
 
       Notification msg = new Notification(STOP_NOTIFICATION_TYPE, this, 2);
       sendNotification(msg);
-
+      
+      isInShutdown = true;
       boolean exitOnShutdown = config.getExitOnShutdown();
       boolean blockingShutdown = config.getBlockingShutdown();
       log.debug("Shutdown operation called, exitOnShutdown: " + exitOnShutdown
@@ -958,6 +971,7 @@
       public void shutdown()
       {
          log.info("JBoss SHUTDOWN: Undeploying all packages");
+         isInShutdown = true;
          if( log.isTraceEnabled() )
             log.trace("Shutdown caller:", new Throwable("Here"));
          shutdownDeployments();




More information about the jboss-cvs-commits mailing list