[jbossws-dev] [Design of JBoss Web Services] - Invocation exception handling

palin do-not-reply at jboss.com
Mon Aug 13 12:39:05 EDT 2007


Hi all,
on jira we currently have an issue about invocation exception handling with the metro stack http://jira.jboss.com/jira/browse/JBWS-1670.
Basically the problem is caused by the handleInvocationException method of the abstract class org.jboss.wsf.spi.invocation.InvocationHandler that unwraps the throwable raised by the service endpoint implementation:
if (th instanceof InvocationTargetException)
  |       {
  |          // Unwrap the throwable raised by the service endpoint implementation
  |          Throwable targetEx = ((InvocationTargetException)th).getTargetException();
  |          handleInvocationException(targetEx);
  |       }
  | 
This is correct for the native stack, but causes the Metro stack integration to fail whenever a custom user exception is thrown, since the unwrapping process is perfomed twice (both by metro and jbossws code above).

This drove me to think that the InvocationHandler might delegate the exception handling process to an InvocationExceptionHandler which is going to be different for each stack (for now, the native one would unwrap InvocationExceptions, the metro one would not).
The EndpointHandlerDeploymentAspect could set the right InvocationExceptionHandler (according to the jbossws-xxx-config.xml) into every InvocationHandler (regardless of its type, the container we are running on, etc).

Any opinion about this?
Bye
Alessio Soldano

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4073647#4073647

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4073647



More information about the jbossws-dev mailing list