Change AsyncJDKInvocationHandler to not use AsyncFaultWrapper
-------------------------------------------------------------

                 Key: TUSCANY-3954
                 URL: https://issues.apache.org/jira/browse/TUSCANY-3954
             Project: Tuscany
          Issue Type: Improvement
    Affects Versions: Java-SCA-2.0
            Reporter: Greg Dritschler
            Priority: Minor
         Attachments: TUSCANY-3954.patch

Background:

When asynchronous invocations are performed using a "non-native" binding, 
Tuscany creates a callback service that implements the AsyncResponseService 
interface.  This interface includes the method

        public void setWrappedFault(AsyncFaultWrapper w)

which is used to send an exception response.  The wrapper contains information 
about the exception class which will be used on the client side to reconstruct 
the exception.  This is all fine.

Problem:

AsyncJDKInvocationHandler also uses the AsyncFaultWrapper for exceptions it 
encounters.  This does not make sense.  These exceptions are either
 * runtime exceptions
 * in the case of invoking a sync service, business exceptions which the 
databinding framework is responsible for making type-compatible with the client.

The use of the AsyncFaultWrapper is unnecessary in these cases.  It also can 
cause problems because the unwrapping process tries to pick a constructor to 
use to reconstruct the exception, and some exception classes do not implement 
the standard constructors.

I am attaching a patch to remove the use of the AsyncFaultWrapper in 
AsyncJDKInvocationHandler.  All tests pass with this patch.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to