Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
servicemix-camel-2010.01
-
None
Description
The Camel API no longer has a dedicated Fault message, instead it uses the Out message with a flag set on it to indicate it's a fault. We should take that into account when replying to the JBI MessageExchange in case of a failure.
Our current implementation is broken when a route returns an Out message (non-fault) and throws an Exception as well, e.g. breaking a route like
from("direct:test") .doTry() .to("log:Starting JBI Test") .to("jbi:endpoint:urn:testcase:testing?mep=in-out") .doCatch(SerialException.class) .to("log:Caught Serial exception") .end(); from("jbi:endpoint:urn:testcase:testing?mep=in-out") .errorHandler(noErrorHandler()) .to("log:about to throw exception?level=ERROR") .throwException(new SerialException("Test"));