Is your scenario different from the one defined in the RMI Binding
test case where the method would throw the Hello business exception ?

String sayHi(String name, String greeter) throws HelloException;

[1] 
https://svn.apache.org/repos/asf/tuscany/java/sca/modules/binding-rmi/src/test/java/org/apache/tuscany/sca/binding/rmi/BindingTestCase.java

On Thu, Jul 17, 2008 at 7:15 AM, Sun Yang <[EMAIL PROTECTED]> wrote:
> Hi,
> I want to get an application specific exception (which extends
> java.rmi.RemoteException) from calling a rmi binding service. But the
> exception always wrappered in a InvocationTargetException.
>
> RMI spec supports remote exception. I am not sure if I missed something in
> the composite configuration or Tuscany doesn't support throwing the
> RemoteException directly.
>
> In RuntimeWireInvoker.java, I find the following code which relates to the
> exception handling.
>             Object body = resp.getBody();
>             if (resp.isFault()) {
>                 throw new InvocationTargetException((Throwable)body);
>             }
> I guess the wrapping here is the cause of the exception wrapper.
>
> Best Regards,
> Yang Sun
>



-- 
Luciano Resende
Apache Tuscany Committer
http://people.apache.org/~lresende
http://lresende.blogspot.com/

Reply via email to