[jboss-cvs] JBossAS SVN: r75555 - trunk/tomcat/src/main/org/jboss/web/tomcat/service/deployers.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Jul 9 12:12:47 EDT 2008


Author: remy.maucherat at jboss.com
Date: 2008-07-09 12:12:47 -0400 (Wed, 09 Jul 2008)
New Revision: 75555

Modified:
   trunk/tomcat/src/main/org/jboss/web/tomcat/service/deployers/TomcatDeployment.java
Log:
- JBAS-5671: Don't remove conflicting web deployments (due to 
  replacement of the JMX bean).

Modified: trunk/tomcat/src/main/org/jboss/web/tomcat/service/deployers/TomcatDeployment.java
===================================================================
--- trunk/tomcat/src/main/org/jboss/web/tomcat/service/deployers/TomcatDeployment.java	2008-07-09 15:44:43 UTC (rev 75554)
+++ trunk/tomcat/src/main/org/jboss/web/tomcat/service/deployers/TomcatDeployment.java	2008-07-09 16:12:47 UTC (rev 75555)
@@ -180,6 +180,9 @@
 
       ObjectName objectName = new ObjectName(objectNameS);
 
+      if (Registry.getRegistry().getMBeanServer().isRegistered(objectName)) {
+    	  throw new DeploymentException("Web mapping already exists for deployment URL " + warUrl);
+      }
       Registry.getRegistry().registerComponent(context, objectName, config.getContextClassName());
 
       String ctxConfig = null;
@@ -355,11 +358,11 @@
          RunAsListener.metaDataLocal.set(null);
          JBossContextConfig.metaDataLocal.set(null);
          JBossContextConfig.metaDataShared.set(null);
-         if (context.getState() != 1)
-         {
-            throw new DeploymentException("URL " + warUrl + " deployment failed");
-         }
       }
+      if (context.getState() != 1)
+      {
+         throw new DeploymentException("URL " + warUrl + " deployment failed");
+      }
 
       // Clustering
       if (metaData.getDistributable() != null)




More information about the jboss-cvs-commits mailing list