On Thursday 18 November 2010 1:47:34 pm Coder One wrote:
> With CXF 2.2.5, my custom Destination makes use of the USE_ORIGINAL_THREAD
> setting
> 
> @Oneway
> void f()
> {
>    throw new RuntimeException("ERROR");
> }
> 
> incomingObserver.onMessage(cxincomingmsg);
> Exception e = (Exception)cxincomingmsg.getContent(Exception.class);
> 
> e is always null.  How can I retrieve the exception in my custom
> destination when the function is @Oneway and throws an exception?

Honestly, I'm not sure you can.   Per spec, oneway operations are not allowed 
to throw faults or anything so it's likely to be swollowed.   It might be on 
the Exchange (msg.getExchange().get(Exception.class), but I'm not really sure.


-- 
Daniel Kulp
[email protected]
http://dankulp.com/blog

Reply via email to