[jboss-cvs] JBossAS SVN: r71357 - projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Mar 27 15:54:18 EDT 2008


Author: anil.saldhana at jboss.com
Date: 2008-03-27 15:54:18 -0400 (Thu, 27 Mar 2008)
New Revision: 71357

Modified:
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/EJBContainer.java
Log:
EJBTHREE-1238: wrap bean initialization in try catch

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/EJBContainer.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/EJBContainer.java	2008-03-27 18:59:31 UTC (rev 71356)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/EJBContainer.java	2008-03-27 19:54:18 UTC (rev 71357)
@@ -213,11 +213,19 @@
       // We can't type cast the direct container, because we just loaded the beanClass
       // so assuming we have an object is a safe bet.
       this.beanContainer = new BeanContainer(this);
+      
+      this.ejbName = ejbName;
+      
       // Because interceptors will query back the EJBContainer for annotations
       // we must have set beanContainer first and then do the advisor. 
-      beanContainer.initialize(ejbName, domain, beanClass, beanMetaData, cl);
-      
-      this.ejbName = ejbName;
+      try
+      {
+         beanContainer.initialize(ejbName, domain, beanClass, beanMetaData, cl); 
+      }
+      catch(Exception e)
+      {
+         throw new RuntimeException("failed to initialize bean container ",e);
+      }
       String on = createObjectName(ejbName);
      
       try




More information about the jboss-cvs-commits mailing list