Thanks, Willem. 

I had already started down this route, but had some trouble. I finally got
it to work. The trick was to make sure that when the exception thrown/caught
by CXF, that I propagated that exception back into the Camel route using
another interceptor. The interceptor uses the following technique:

public void handleException(final Message message)
    {
        Throwable exception = message.getContent(Exception.class);
        
                if (exception != null) {
                        Exchange exchange = (Exchange) 
message.get("org.apache.camel.exchange");
                        if (exchange != null) {
                                exchange.setException(exception);
                        }
                }
    }

This way the Camel route recieves the exception and can process the message
with an onException clause.

Thanks, 

-g8torPaul





--
View this message in context: 
http://camel.465427.n5.nabble.com/CXF-Inteceptor-Error-handling-with-Camel-CXF-JMS-and-ActiveMQ-tp5758297p5758453.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to