[jboss-cvs] JBossAS SVN: r62871 - trunk/ejb3/src/main/org/jboss/ejb3.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue May 8 10:17:40 EDT 2007


Author: wolfc
Date: 2007-05-08 10:17:39 -0400 (Tue, 08 May 2007)
New Revision: 62871

Modified:
   trunk/ejb3/src/main/org/jboss/ejb3/Ejb3Deployment.java
Log:
EJBTHREE-957: improved exception messages

Modified: trunk/ejb3/src/main/org/jboss/ejb3/Ejb3Deployment.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/Ejb3Deployment.java	2007-05-08 14:16:56 UTC (rev 62870)
+++ trunk/ejb3/src/main/org/jboss/ejb3/Ejb3Deployment.java	2007-05-08 14:17:39 UTC (rev 62871)
@@ -600,13 +600,13 @@
 
       AssemblyDescriptor ad = dd.getAssemblyDescriptor();
       if(ad == null)
-         throw new IllegalStateException("No assembly descriptor found");
+         throw new IllegalStateException("No assembly descriptor found in '" + getName() + "'");
       MessageDestination md = ad.findMessageDestination(name);
       if(md == null)
-         throw new IllegalStateException("No message destination '" + name + "' found");
+         throw new IllegalStateException("No message destination '" + name + "' found in '" + getName() + "'");
       String jndiName = md.getJndiName();
       if(jndiName == null)
-         throw new IllegalStateException("No jndi name specified for message destination '" + name + "'");
+         throw new IllegalStateException("No jndi name specified for message destination '" + name + "' in '" + getName() + "'");
       return jndiName;
    }
    
@@ -633,4 +633,9 @@
       }
       return getMessageDestination(link);
    }
+   
+   public String getName()
+   {
+      return unit.getShortName();
+   }
 }




More information about the jboss-cvs-commits mailing list