Issue Type: Bug Bug
Affects Versions: 1.0
Assignee: Unassigned
Components: core
Created: 12/Jan/14 5:06 PM
Description:

A bug in camel leads to the situation that a Camel route like the following is not returned to the caller.

onException(Exception.class)
.handled(true)
.transform()
.simple("Error reported: $

{exception.message}

- cannot process this message.")
;

from("switchyard://OnExceptionService")
.process(new Processor() {
@Override
public void process(Exchange exchange) throws Exception

{ throw new Exception("Mock Exception"); }

});

I could track the behaviour down to the class org.switchyard.bus.camel.CamelExchangeBusRouteBuilder which uses a camel try-catch-finally block to handle exceptions for the routing of switchyard services. The finally block consists of two Processors:

InterceptProcessor
ConsumerCallbackProcessor

Due to a camel bug see #1 only the first processor of a finally block is executed. The second processor, which returns the exchange to the caller, is ommited, as camel thinks some other exception happened.

A possible workaround would be the addition of another processor that removes the Exchange.ERRORHANDLER_HANDLED property from the exchange or the upgrade the version of camel.

#1 http://stackoverflow.com/questions/20399863/if-route-threw-exception-and-handled-is-set-to-true-only-first-processor-in-dof

Environment: Switchyard 1.1.0-Final
Project: SwitchYard
Priority: Major Major
Reporter: Sascha Dirbach
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira