[jboss-cvs] JBossAS SVN: r67143 - in trunk/ejb3/src/main/org/jboss/ejb3: deployers and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Nov 15 11:22:48 EST 2007
Author: adrian at jboss.org
Date: 2007-11-15 11:22:48 -0500 (Thu, 15 Nov 2007)
New Revision: 67143
Modified:
trunk/ejb3/src/main/org/jboss/ejb3/Ejb3Deployment.java
trunk/ejb3/src/main/org/jboss/ejb3/deployers/Ejb3Deployer.java
Log:
Log the deployment and ejbname when initialization fails
Modified: trunk/ejb3/src/main/org/jboss/ejb3/Ejb3Deployment.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/Ejb3Deployment.java 2007-11-15 16:20:53 UTC (rev 67142)
+++ trunk/ejb3/src/main/org/jboss/ejb3/Ejb3Deployment.java 2007-11-15 16:22:48 UTC (rev 67143)
@@ -46,6 +46,7 @@
import org.hibernate.cfg.EJB3DTDEntityResolver;
import org.hibernate.ejb.packaging.PersistenceMetadata;
+import org.jboss.deployers.spi.DeploymentException;
import org.jboss.ejb3.cache.CacheFactoryRegistry;
import org.jboss.ejb3.cache.Ejb3CacheFactory;
import org.jboss.ejb3.cache.StatefulCache;
@@ -502,9 +503,16 @@
// EJBContainer has finished with all metadata initialization from XML files and such.
// this is really a hook to do some processing after XML has been set up and before
// and processing of dependencies and such.
- ((EJBContainer)con).instantiated();
- this.ejbContainers.put(con.getObjectName(), con);
- Ejb3Registry.register(con);
+ try
+ {
+ ((EJBContainer)con).instantiated();
+ this.ejbContainers.put(con.getObjectName(), con);
+ Ejb3Registry.register(con);
+ }
+ catch (Throwable t)
+ {
+ throw new DeploymentException("Error creating ejb container " + con.getEjbName() + ": " + t.getMessage(), t);
+ }
}
}
}
Modified: trunk/ejb3/src/main/org/jboss/ejb3/deployers/Ejb3Deployer.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/deployers/Ejb3Deployer.java 2007-11-15 16:20:53 UTC (rev 67142)
+++ trunk/ejb3/src/main/org/jboss/ejb3/deployers/Ejb3Deployer.java 2007-11-15 16:22:48 UTC (rev 67143)
@@ -146,9 +146,9 @@
// TODO: temporarily disable the security deployment
unit.addAttachment(JaccPolicyUtil.IGNORE_ME_NAME, true, Boolean.class);
}
- catch (Exception e)
+ catch (Throwable t)
{
- throw new DeploymentException(e);
+ throw new DeploymentException("Error deploying " + unit.getSimpleName() + ": " + t.getMessage(), t);
}
}
More information about the jboss-cvs-commits
mailing list