[jboss-cvs] JBossAS SVN: r111920 - in projects/ejb3/branches/jboss-ejb3-core-1.3.7_JBPAPP-5516: src/main/java/org/jboss/ejb3/mdb/inflow and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Aug 3 15:46:18 EDT 2011
Author: jbertram at redhat.com
Date: 2011-08-03 15:46:17 -0400 (Wed, 03 Aug 2011)
New Revision: 111920
Modified:
projects/ejb3/branches/jboss-ejb3-core-1.3.7_JBPAPP-5516/
projects/ejb3/branches/jboss-ejb3-core-1.3.7_JBPAPP-5516/src/main/java/org/jboss/ejb3/mdb/inflow/MessageInflowLocalProxy.java
Log:
JBPAPP-6964
Property changes on: projects/ejb3/branches/jboss-ejb3-core-1.3.7_JBPAPP-5516
___________________________________________________________________
Added: svn:mergeinfo
+ /projects/ejb3/branches/jboss-ejb3-core-1.3:111086
Modified: projects/ejb3/branches/jboss-ejb3-core-1.3.7_JBPAPP-5516/src/main/java/org/jboss/ejb3/mdb/inflow/MessageInflowLocalProxy.java
===================================================================
--- projects/ejb3/branches/jboss-ejb3-core-1.3.7_JBPAPP-5516/src/main/java/org/jboss/ejb3/mdb/inflow/MessageInflowLocalProxy.java 2011-08-03 19:35:24 UTC (rev 111919)
+++ projects/ejb3/branches/jboss-ejb3-core-1.3.7_JBPAPP-5516/src/main/java/org/jboss/ejb3/mdb/inflow/MessageInflowLocalProxy.java 2011-08-03 19:46:17 UTC (rev 111920)
@@ -23,6 +23,7 @@
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
+import java.lang.reflect.UndeclaredThrowableException;
import java.util.concurrent.atomic.AtomicBoolean;
import javax.resource.ResourceException;
@@ -263,7 +264,18 @@
throw new ResourceException(t);
}
}
-
+
+ private static boolean checked(Method method, Class<?> exceptionType)
+ {
+ final Class<?>[] allowedExceptionTypes = method.getExceptionTypes();
+ for (Class<?> allowedExceptionType : allowedExceptionTypes)
+ {
+ if (allowedExceptionType.isAssignableFrom(exceptionType))
+ return true;
+ }
+ return false;
+ }
+
/**
* Delivery.
*
@@ -302,6 +314,11 @@
{
if (trace)
log.trace("MessageEndpoint " + getProxyString(proxy) + " delivery error", t);
+ if (t instanceof Exception)
+ {
+ if (!(t instanceof RuntimeException) && !checked(method, t.getClass()))
+ t = new UndeclaredThrowableException(t);
+ }
if (t instanceof Error || t instanceof RuntimeException)
{
if (transaction != null)
More information about the jboss-cvs-commits
mailing list