You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by rkrdr <ca...@thesiglers.net> on 2011/02/25 22:09:48 UTC
Re: Issue with route specific onException and jms component
Is this related to the asynchronous routing engine for jms producer
introduced in camel 2.5? As it relates to exceptions "thrown" from that
producer? You might try the test again disabling the asynchronous engine
for the jms producer ( set ?synchronous=true) to see if the result changes.
Just a thought.
http://camel.apache.org/asynchronous-routing-engine.html
and
http://camel.apache.org/asynchronous-processing.html
--
View this message in context: http://camel.465427.n5.nabble.com/RE-Issue-with-route-specific-onException-and-jms-component-tp3317547p3400815.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Issue with route specific onException and jms component
Posted by rkrdr <ca...@thesiglers.net>.
Yes I think there is a bug related catching exceptions that are thrown by the
jms producer. As well, I noticed a side effect in camel 2.5.0 directly
related to the asynchronous routing engine is that exceptions thrown (i.e.
not specifically set on the exchange) in an aggregator aggregating
request/reply from a jms endpoint are no longer handled in the onException
for the route. If on the other hand, the aggregator code is surrounded by
try/catch and sets the exception on the exchange...the onException handler
will be invoked. The requirement to set the exception on the exchange is
documented here:
http://camel.apache.org/asynchronous-processing.html
But this appears to have became a _requirement_ after moving to 2.5 due to
the asynchronous routing engine changes for jms. If I revert back to using
the synchronous=true on the jms producer, exceptions thrwon from the
aggregator are picked up in the onException whether or not set on the
exchange directly. I'm concerned about other places in the route where
exceptions may be thrown (i.e. the jms producer itself)
I have not used doTry/doCatch construct thus far in camel.
--
View this message in context: http://camel.465427.n5.nabble.com/RE-Issue-with-route-specific-onException-and-jms-component-tp3317547p3403953.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Issue with route specific onException and jms component
Posted by Chad Wilson <c....@baml.com>.
Genius! You appear to be absolutely correct. I've been meaning to come back
to this to log a bug properly, so thanks for the kick.
My earlier JUnit test I attached now passes with ?synchronous=true on the
JMS endpoint; and of course explains why I could not replicate the behaviour
with non-JMS endpoints.
Which leads to the further question - is this still a bug? Why with the
Asynchronous Routing Engine does the exception bubble up to the "parent"
route?
--
View this message in context: http://camel.465427.n5.nabble.com/RE-Issue-with-route-specific-onException-and-jms-component-tp3317547p3402793.html
Sent from the Camel - Users mailing list archive at Nabble.com.