[webbeans-commits] Webbeans SVN: r2770 - ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy.
webbeans-commits at lists.jboss.org
webbeans-commits at lists.jboss.org
Fri Jun 5 08:38:32 EDT 2009
Author: pete.muir at jboss.org
Date: 2009-06-05 08:38:32 -0400 (Fri, 05 Jun 2009)
New Revision: 2770
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/EnterpriseBeanProxyMethodHandler.java
Log:
WBRI-253
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/EnterpriseBeanProxyMethodHandler.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/EnterpriseBeanProxyMethodHandler.java 2009-06-05 12:36:07 UTC (rev 2769)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/proxy/EnterpriseBeanProxyMethodHandler.java 2009-06-05 12:38:32 UTC (rev 2770)
@@ -155,6 +155,10 @@
businessInterface = objectInterface;
}
Object proxiedInstance = reference.getBusinessObject(businessInterface);
+ if (proxiedInstance == null)
+ {
+ throw new IllegalStateException("No EJB can be found in the EJB container for " + reference + ". Make sure you are running an EJB container.");
+ }
Method proxiedMethod = Reflections.lookupMethod(method, proxiedInstance);
Object returnValue = Reflections.invokeAndWrap(proxiedMethod, proxiedInstance, args);
log.trace("Executed " + method + " on " + proxiedInstance + " with parameters " + args + " and got return value " + returnValue);
More information about the weld-commits
mailing list