You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Hilde <hi...@yahoo.de> on 2012/09/19 15:31:43 UTC

transacted() in combination with onException()

Hello folks!

The book "Camel in Action" says on page 293 "NOTE: When using transacted()
in the Java DSL, 
you must add it right after from() to ensure that the route is properly
configured to use 
transactions. ..."

However when onException() is used after transacted(), onException() is
thrown immediately. 
That is very odd and there is also no exception visible.

We are using Apache Camel 2.10.0

Cheers
Hilde 



--
View this message in context: http://camel.465427.n5.nabble.com/transacted-in-combination-with-onException-tp5719591.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: transacted() in combination with onException()

Posted by Hilde <hi...@yahoo.de>.
Hello Claus!

Thank you for your explanations!



--
View this message in context: http://camel.465427.n5.nabble.com/transacted-in-combination-with-onException-tp5719591p5719597.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: transacted() in combination with onException()

Posted by Claus Ibsen <cl...@gmail.com>.
On Wed, Sep 19, 2012 at 3:31 PM, Hilde <hi...@yahoo.de> wrote:
> Hello folks!
>
> The book "Camel in Action" says on page 293 "NOTE: When using transacted()
> in the Java DSL,
> you must add it right after from() to ensure that the route is properly
> configured to use
> transactions. ..."
>
> However when onException() is used after transacted(), onException() is
> thrown immediately.
> That is very odd and there is also no exception visible.
>
> We are using Apache Camel 2.10.0
>

Yes onException should come first. Ideally the Java DSL would not care
if that matters, but you found a glitch there.
The XML DSLs dont have that issue.

Its though not as common to use onException together with TX as the
idea with a TX is to let the external system
redeliver or handle the problem if Camel cannot successfully process
the message.

> Cheers
> Hilde
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/transacted-in-combination-with-onException-tp5719591.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen