camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g8torPaul <>
Subject Re: CXF Inteceptor Error handling with Camel-CXF, JMS and ActiveMQ
Date Mon, 03 Nov 2014 13:17:39 GMT
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("");
			if (exchange != null) {

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



View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message