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

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sat Aug 14 10:41:58 EDT 2010


Author: jaikiran
Date: 2010-08-14 10:41:58 -0400 (Sat, 14 Aug 2010)
New Revision: 107614

Modified:
   projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/Ejb3AnnotationHandler.java
Log:
EJBTHREE-2149 Better error reporting when an AOP domain isn't available

Modified: projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/Ejb3AnnotationHandler.java
===================================================================
--- projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/Ejb3AnnotationHandler.java	2010-08-14 05:05:24 UTC (rev 107613)
+++ projects/ejb3/trunk/core/src/main/java/org/jboss/ejb3/Ejb3AnnotationHandler.java	2010-08-14 14:41:58 UTC (rev 107614)
@@ -261,8 +261,11 @@
       DomainDefinition domain = AspectManager.instance().getContainer(containerName);
 
       if (domain == null)
-         throw new RuntimeException("No container configured with name '"
-                 + containerName + "''");
+      {
+         throw new RuntimeException("Could not get container for bean class " + beanMetaData.getEjbClass()
+               + " with bean name " + beanMetaData.getEjbName() + " because no container configured with name '"
+               + containerName + "'");
+      }
 
       return new ServiceContainer(deployment.getMbeanServer(), di.getClassLoader(), className,
               ejbNames.get(ejbIndex), (Domain) domain.getManager(), ctxProperties,
@@ -276,8 +279,11 @@
       DomainDefinition domain = AspectManager.instance().getContainer(containerName);
 
       if (domain == null)
-         throw new RuntimeException("No container configured with name '"
-                 + containerName + "''");
+      {
+         throw new RuntimeException("Could not get container for bean class " + beanMetaData.getEjbClass()
+               + " with bean name " + beanMetaData.getEjbName() + " because no container configured with name '"
+               + containerName + "'");
+      }
 
       return new ConsumerContainer(ejbNames.get(ejbIndex), (Domain) domain.getManager(),
               di.getClassLoader(), className, ctxProperties,
@@ -291,8 +297,11 @@
       DomainDefinition domain = AspectManager.instance().getContainer(containerName);
 
       if (domain == null)
-         throw new RuntimeException("No container configured with name '"
-                 + containerName + "''");
+      {
+         throw new RuntimeException("Could not get container for bean class " + beanMetaData.getEjbClass()
+               + " with bean name " + beanMetaData.getEjbName() + " because no container configured with name '"
+               + containerName + "'");
+      }
 
       return new StatefulContainer(di.getClassLoader(), className, ejbNames.get(ejbIndex),
             (Domain) domain.getManager(), ctxProperties, deployment, beanMetaData, deployment
@@ -307,8 +316,11 @@
       DomainDefinition domain = AspectManager.instance().getContainer(containerName);
 
       if (domain == null)
-         throw new RuntimeException("No container configured with name '"
-                 + containerName + "''");
+      {
+         throw new RuntimeException("Could not get container for bean class " + beanMetaData.getEjbClass()
+               + " with bean name " + beanMetaData.getEjbName() + " because no container configured with name '"
+               + containerName + "'");
+      }
 
       return new StatelessContainer(di.getClassLoader(), className, ejbNames.get(ejbIndex), (Domain) domain
             .getManager(), ctxProperties, deployment, beanMetaData, deployment.getAsynchronousProcessor());
@@ -332,8 +344,11 @@
       DomainDefinition domain = AspectManager.instance().getContainer(containerName);
 
       if (domain == null)
-         throw new RuntimeException("No container configured with name '"
-                 + containerName + "''");
+      {
+         throw new RuntimeException("Could not get container for bean class " + beanMetaData.getEjbClass()
+               + " with bean name " + beanMetaData.getEjbName() + " because no container configured with name '"
+               + containerName + "'");
+      }
 
       MDB container = new MDB(ejbNames.get(ejbIndex), (Domain) domain.getManager(), di.getClassLoader(), className,
               ctxProperties, deployment, beanMetaData);



More information about the jboss-cvs-commits mailing list