Author: alessio.soldano(a)jboss.com
Date: 2008-02-15 12:25:53 -0500 (Fri, 15 Feb 2008)
New Revision: 5714
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java
Log:
[JBWS-1941] Changing implementation to catch every kind of exception
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java 2008-02-15
16:56:57 UTC (rev 5713)
+++
stack/native/trunk/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java 2008-02-15
17:25:53 UTC (rev 5714)
@@ -217,7 +217,16 @@
Invocation inv = setupInvocation(endpoint, sepInv, invContext);
InvocationHandler invHandler = endpoint.getInvocationHandler();
- invHandler.invoke(endpoint, inv);
+ try
+ {
+ invHandler.invoke(endpoint, inv);
+ }
+ catch (InvocationTargetException th)
+ {
+ //Unwrap the throwable raised by the service endpoint implementation
+ Throwable targetEx = th.getTargetException();
+ throw (targetEx instanceof Exception ? (Exception)targetEx : new
UndeclaredThrowableException(targetEx));
+ }
// Handler processing might have replaced the endpoint invocation
sepInv =
inv.getInvocationContext().getAttachment(EndpointInvocation.class);
@@ -260,12 +269,8 @@
faultType[0] = null;
}
}
- catch (InvocationTargetException invocationEx)
+ catch (Exception ex)
{
- //Unwrap the throwable raised by the service endpoint implementation
- Throwable targetEx = invocationEx.getTargetException();
- Exception ex = targetEx instanceof Exception ? (Exception)targetEx : new
UndeclaredThrowableException(targetEx);
-
// Reverse the message direction
processPivotInternal(msgContext, direction);
Show replies by date