[ 
https://issues.apache.org/jira/browse/CAMEL-13640?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-13640:
--------------------------------
    Fix Version/s: Future

> Camel Split with Aggregate, calling subroute with onException (handled = 
> true) stops, doesn't work the same way as calling a sub route using doTry 
> ---------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-13640
>                 URL: https://issues.apache.org/jira/browse/CAMEL-13640
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.24.0
>            Reporter: George Daswani
>            Priority: Minor
>             Fix For: Future
>
>         Attachments: BugReport.zip
>
>
> Split  with Aggregate calling a sub route that has handled exception (eq. 
> direct:exceptionStart) doesn't behave the same as one calling a sub route 
> swallowing exceptions using doTry (eq. direct:doTryStart)
> The two should be functionally equivalent but the one calling the sub route 
> with onException stops prematurely.   It never gets to ".log("done with split 
> and aggregate").   
> Others have reported the same thing on the camel-users list - [for 
> example|http://camel.465427.n5.nabble.com/Split-with-Aggregation-when-throw-Exception-issue-td5750159.html]
> Sample program attached (maven project) - BugReport.zip
>  
> {code:java}
> public void configure() throws Exception {
> from("direct:exceptionStart").routeId("exceptionStart").split(body(), new 
> MyAggregationStrategy())
> .to("direct:processItemOnException").end().log("done with split and 
> aggregate");
> from("direct:processItemOnException").routeId("processItemOnException").onException(Exception.class)
> .handled(true).end().log("${body}").throwException(new Exception("an 
> Error!"));
> from("direct:doTryStart").routeId("doTryStart").split(body(), new 
> MyAggregationStrategy())
> .to("direct:processItemOnDoTry").end().log("done with split and aggregate");
> from("direct:processItemOnDoTry").routeId("processItemOnDoTry").doTry().log("${body}")
> .throwException(new Exception("an 
> Error!")).endDoTry().doCatch(Exception.class)
> .log("swallowed exception");
> }{code}
>  



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to