Hi,

In Spring, it is possible to have one single transaction used between
several services calls (where Hibernate DAO are used by example). Here is a
small example and discussion about this subject on the web (
http://forum.springsource.org/showthread.php?t=73544)

Is it possible in camel route that one single transaction encompass several
endpoints and not only one ?

from(queueA)
.transacted
// Here is when the transaction start
.to(bean:saveRequest) --> save data in DB : table Request
// transaction propagated
.to(bean:saveRequestMessage) --> save data in DB : table RequestMessage
// transaction ended
.to(bean:TransformRequest)
.to(QueueB)

It should be interesting to define when the transaction finished.

Moreover, it should be able by example to test in my example if errors occur
during the call to(bean:TransformRequest), if this the case, global rollback
can be done on the two services called

Regards,

Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer

*****************************
blog : http://cmoulliard.blogspot.com

Reply via email to