I am trying to set up a route that spans an XA transaction from a jms endpoint to a db based endpoint or to another JMS endpoint.

If I do a route like this:
from("jms:queue1").transacted().to("jms:queue2")

Will the transaction then also include the receive of the JMS message?

I have set up an example at:
https://github.com/Talend/tesb-rt-se/tree/ebook-example/examples/tesb/ebook

The route is at
https://github.com/Talend/tesb-rt-se/blob/ebook-example/examples/tesb/ebook/ebook-importer/src/main/java/org/talend/esb/examples/ebook/importer/ImportRoutes.java
and the blueprint is here
https://github.com/Talend/tesb-rt-se/blob/ebook-example/examples/tesb/ebook/ebook-importer/src/main/resources/OSGI-INF/blueprint/blueprint.xml

I have implemented the BookRepository using Aries JPA and it supports XA transactions. For the test I throw an exception if the book title is "error1". I see the exception in camel but the message does not seem to be returned to the broker and I see no redelivery.

I configured the ConnectionFactory like this:
https://github.com/Talend/tesb-rt-se/blob/ebook-example/examples/tesb/ebook/ebook-connectionfactory/src/main/resources/OSGI-INF/blueprint/blueprint.xml

Any idea what I am doing wrong? Or do I misunderstand the concept of transactional routes in camel and this simply can not work?
Can I debug the transaction handling somehow?

Christian

--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

Reply via email to