[jboss-cvs] JBossAS SVN: r63045 - branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue May 15 07:06:39 EDT 2007


Author: wolfc
Date: 2007-05-15 07:06:39 -0400 (Tue, 15 May 2007)
New Revision: 63045

Modified:
   branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3/Ejb3Deployment.java
Log:
EJBTHREE-962: merged from trunk

Modified: branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3/Ejb3Deployment.java
===================================================================
--- branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3/Ejb3Deployment.java	2007-05-15 10:57:37 UTC (rev 63044)
+++ branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3/Ejb3Deployment.java	2007-05-15 11:06:39 UTC (rev 63045)
@@ -314,16 +314,30 @@
     */
    public void create() throws Exception
    {
-      long start = System.currentTimeMillis();
-
-      pc = createPolicyConfiguration();
-
-      deploy();
-
-      initializePersistenceUnits();
-
-      log.debug("EJB3 deployment time took: "
-              + (System.currentTimeMillis() - start));
+      try
+      {
+         long start = System.currentTimeMillis();
+   
+         pc = createPolicyConfiguration();
+   
+         deploy();
+   
+         initializePersistenceUnits();
+   
+         log.debug("EJB3 deployment time took: " + (System.currentTimeMillis() - start));
+      }
+      catch(Exception e)
+      {
+         try
+         {
+            destroy();
+         }
+         catch(Exception ignored)
+         {
+            // ignore
+         }
+         throw e;
+      }
    }
 
    public void start() throws Exception




More information about the jboss-cvs-commits mailing list