Hi,

I notice that we use the message body to flow business exceptions back to the client with the following code from TargetInvoker implementations.

public Message invoke(Message msg) throws InvocationRuntimeException {
try {
   Object resp = invokeTarget(msg.getBody());
   msg.setBody(resp);
} catch (InvocationTargetException e) {
   msg.setBody(e.getCause());
} catch (Throwable e) {
   msg.setBody(e);
}
return msg;
}

I think it's problematic. Even though most of the services won't use Throwable as normal input/output but at least java syntax allows so. Can we have a flag on the message to indicate it's a fault?

Thanks,
Raymond

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to