openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cove...@apache.org
Subject svn commit: r1292956 - /openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/proxy/EjbBeanProxyHandler.java
Date Thu, 23 Feb 2012 21:07:57 GMT
Author: covener
Date: Thu Feb 23 21:07:57 2012
New Revision: 1292956

URL: http://svn.apache.org/viewvc?rev=1292956&view=rev
Log:
[OWB-649] unwrap exceptions from @Inject'ed EJBs.


Modified:
    openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/proxy/EjbBeanProxyHandler.java

Modified: openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/proxy/EjbBeanProxyHandler.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/proxy/EjbBeanProxyHandler.java?rev=1292956&r1=1292955&r2=1292956&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/proxy/EjbBeanProxyHandler.java
(original)
+++ openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/proxy/EjbBeanProxyHandler.java
Thu Feb 23 21:07:57 2012
@@ -25,6 +25,7 @@ import java.io.ObjectInputStream;
 import java.io.ObjectOutput;
 import java.io.ObjectOutputStream;
 import java.io.Serializable;
+import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.util.List;
 
@@ -103,7 +104,7 @@ public class EjbBeanProxyHandler impleme
     /**
      * {@inheritDoc}
      */
-    public Object invoke(Object proxyInstance, Method method, Method proceed, Object[] arguments)
throws Exception
+    public Object invoke(Object proxyInstance, Method method, Method proceed, Object[] arguments)
throws Throwable 
     {
         Object result = null;
         
@@ -189,6 +190,10 @@ public class EjbBeanProxyHandler impleme
             }
             result = method.invoke(webbeansInstance, arguments);
         }
+        catch (InvocationTargetException ite) 
+        {
+            throw ite.getCause();
+        }
         finally
         {
             OpenWebBeansEjbInterceptor.unsetThreadLocal();   



Mime
View raw message