[jboss-cvs] JBossAS SVN: r67220 - projects/microcontainer/trunk/deployers-impl/src/main/org/jboss/deployers/plugins/main.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sat Nov 17 09:24:14 EST 2007


Author: alesj
Date: 2007-11-17 09:24:14 -0500 (Sat, 17 Nov 2007)
New Revision: 67220

Modified:
   projects/microcontainer/trunk/deployers-impl/src/main/org/jboss/deployers/plugins/main/MainDeployerImpl.java
Log:
Adding read lock to shutdown checkers - moving try clause up.

Modified: projects/microcontainer/trunk/deployers-impl/src/main/org/jboss/deployers/plugins/main/MainDeployerImpl.java
===================================================================
--- projects/microcontainer/trunk/deployers-impl/src/main/org/jboss/deployers/plugins/main/MainDeployerImpl.java	2007-11-17 14:21:39 UTC (rev 67219)
+++ projects/microcontainer/trunk/deployers-impl/src/main/org/jboss/deployers/plugins/main/MainDeployerImpl.java	2007-11-17 14:24:14 UTC (rev 67220)
@@ -247,12 +247,12 @@
       if (deployment == null)
          throw new DeploymentException("Null context");
       
-      if (shutdown.get())
-         throw new DeploymentException("The main deployer is shutdown");
-
       lockRead();
       try
       {
+         if (shutdown.get())
+            throw new DeploymentException("The main deployer is shutdown");
+
          String name = deployment.getName();
          log.debug("Add deployment: " + name);
 
@@ -341,12 +341,12 @@
       if (name == null)
          throw new DeploymentException("Null name");
 
-      if (shutdown.get())
-         throw new IllegalStateException("The main deployer is shutdown");
-
       lockRead();
       try
       {
+         if (shutdown.get())
+            throw new IllegalStateException("The main deployer is shutdown");
+
          log.debug("Remove deployment context: " + name);
 
          DeploymentContext context = topLevelDeployments.remove(name);




More information about the jboss-cvs-commits mailing list