[jboss-cvs] JBossAS SVN: r77781 - trunk/tomcat/src/main/org/jboss/web/tomcat/service/deployers.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Sep 2 11:45:08 EDT 2008
Author: remy.maucherat at jboss.com
Date: 2008-09-02 11:45:08 -0400 (Tue, 02 Sep 2008)
New Revision: 77781
Modified:
trunk/tomcat/src/main/org/jboss/web/tomcat/service/deployers/TomcatDeployment.java
Log:
- JBAS-5917: Destroy the context right away if there is an error
starting it.
- This will need a new JBoss Web CR to fix the issue though since
StandardPipeline will likely throw an exception, (likely) making the
JMX removal fail.
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-09-02 12:21:16 UTC (rev 77780)
+++ trunk/tomcat/src/main/org/jboss/web/tomcat/service/deployers/TomcatDeployment.java 2008-09-02 15:45:08 UTC (rev 77781)
@@ -348,14 +348,13 @@
JBossContextConfig.deploymentUnitLocal.set(unit);
try
{
- // Init the context
- context.init();
// Start it
context.start();
// Build the ENC
}
catch(Exception e)
{
+ context.destroy();
DeploymentException.rethrowAsDeploymentException("URL " + warUrl + " deployment failed", e);
}
finally
@@ -370,6 +369,7 @@
}
if (context.getState() != 1)
{
+ context.destroy();
throw new DeploymentException("URL " + warUrl + " deployment failed");
}
More information about the jboss-cvs-commits
mailing list