You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by yogu13 <yo...@gmail.com> on 2015/06/09 10:53:32 UTC

Transactional Client in Camel

Hi,

Wanted some clarity on the usage of Transactional Client

In situation like below

<route>
 <from uri="jms:queue:inputQueue"/>
 <transacted ref="required"/>
 <log message="Received Message"/>
 <to uri="direct:postResponse"/>
</route>

<route>
<from uri="direct:postResponse"/>
<log message="Processing"/>
<to uri="jms:queue:outputQueue"/>
</route>

Considering the above route does the transaction span from the getting the
message from the inputQueue till the message is posted on to outputQueue ?
and would any issue/exception raised during processing trigger rollback of
message to the inputqueue ?

Please let me know incase any further details are required

Regards,
-Yogesh




--
View this message in context: http://camel.465427.n5.nabble.com/Transactional-Client-in-Camel-tp5768012.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Transactional Client in Camel

Posted by yogu13 <yo...@gmail.com>.
Thank you David,

One last question on this regard..since transactional client signifies start
of the transaction, does that mean configuration properties like
transact=true and transactionManager on the jms endpoint wouldn't kick start
a transaction as soon as a message arrives and instead it is only started
once transactional client tag is encountered in route ?



--
View this message in context: http://camel.465427.n5.nabble.com/Transactional-Client-in-Camel-tp5768012p5768090.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Transactional Client in Camel

Posted by David Karlsen <da...@gmail.com>.
It commit's as the route is complete.
Transcational client is nothing more than demarcating start of the
transaction.
It lives on top of Spring PlatformTransactionManager:
http://camel.apache.org/transactional-client.html
An endpoint midway in the route that does not support transactions is no
different than calling a non-transactionaware pojo from a transactional
service in a traditional spring way.

2015-06-10 8:58 GMT+02:00 yogu13 <yo...@gmail.com>:

> Hello,
>
> Thank you for answering ..please help me understand what happens if within
> the route if there is a endpoint which doesn't support transactions? in
> this
> case, does the transaction started gets committed as soon as it encounters
> such an endpoint ? or only gets committed at the end of the route ?
>
> Thanks in advance,
>
> Regards,
> -Yogesh
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Transactional-Client-in-Camel-tp5768012p5768053.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
--
David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen

Re: Transactional Client in Camel

Posted by yogu13 <yo...@gmail.com>.
Hello,

Thank you for answering ..please help me understand what happens if within
the route if there is a endpoint which doesn't support transactions? in this
case, does the transaction started gets committed as soon as it encounters
such an endpoint ? or only gets committed at the end of the route ?

Thanks in advance,

Regards,
-Yogesh



--
View this message in context: http://camel.465427.n5.nabble.com/Transactional-Client-in-Camel-tp5768012p5768053.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Transactional Client in Camel

Posted by David Karlsen <da...@gmail.com>.
You can span routes if it happens synchronously (same thread) that is using
direct:endpoint between them
10. jun. 2015 07.31 skrev "yogu13" <yo...@gmail.com>:

> any one used transactions before with jms ? did that span across routes or
> was limited to the route in which it was started ?
>
> Regards,
> -Yogesh
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Transactional-Client-in-Camel-tp5768012p5768044.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Re: Transactional Client in Camel

Posted by yogu13 <yo...@gmail.com>.
any one used transactions before with jms ? did that span across routes or
was limited to the route in which it was started ?

Regards,
-Yogesh



--
View this message in context: http://camel.465427.n5.nabble.com/Transactional-Client-in-Camel-tp5768012p5768044.html
Sent from the Camel - Users mailing list archive at Nabble.com.