[jboss-cvs] JBossAS SVN: r69669 - 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 Feb 6 14:57:37 EST 2008


Author: sohil.shah at jboss.com
Date: 2008-02-06 14:57:36 -0500 (Wed, 06 Feb 2008)
New Revision: 69669

Modified:
   trunk/tomcat/src/main/org/jboss/web/tomcat/service/deployers/TomcatDeployment.java
Log:
JBAS-5213 - Fix org.jboss.test.web.test.WebIntegrationUnitTestCase

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-02-06 19:47:49 UTC (rev 69668)
+++ trunk/tomcat/src/main/org/jboss/web/tomcat/service/deployers/TomcatDeployment.java	2008-02-06 19:57:36 UTC (rev 69669)
@@ -50,6 +50,7 @@
 import org.apache.catalina.core.StandardContext;
 import org.apache.tomcat.util.modeler.Registry;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.deployers.spi.DeploymentException;
 import org.jboss.logging.Logger;
 import org.jboss.metadata.javaee.spec.ServiceReferenceMetaData;
 import org.jboss.metadata.javaee.spec.ServiceReferencesMetaData;
@@ -347,11 +348,19 @@
          context.start();
          // Build the ENC
       }
+      catch(Exception e)
+      {
+         DeploymentException.rethrowAsDeploymentException("URL " + warUrl + " deployment failed", e);
+      }
       finally
       {
          RunAsListener.metaDataLocal.set(null);
          JBossContextConfig.metaDataLocal.set(null);
          JBossContextConfig.metaDataShared.set(null);
+         if (context.getState() != 1)
+         {
+            throw new DeploymentException("URL " + warUrl + " deployment failed");
+         }
       }
 
       // Clustering
@@ -536,18 +545,18 @@
             catch (Throwable t)
             {
                log.error("ENC setup failed", t);
+               throw new RuntimeException(t);
             }
             finally
             {
                currentThread.setContextClassLoader(currentLoader);
+               
+               log.debug("injectionContainer enabled and processing beginning");
+               // we need to do this because the classloader is initialize by the web container and
+               // the injection container needs the classloader so that it can build up Injectors and ENC populators
+               injectionContainer.setClassLoader(webLoader.getClassLoader());
+               injectionContainer.processMetadata();
             }
-
-            log.debug("injectionContainer enabled and processing beginning");
-            // we need to do this because the classloader is initialize by the web container and
-            // the injection container needs the classloader so that it can build up Injectors and ENC populators
-            injectionContainer.setClassLoader(webLoader.getClassLoader());
-            injectionContainer.processMetadata();
-
          }
       }
 




More information about the jboss-cvs-commits mailing list