Re: Transactional Route with JTA

2015-11-02 Thread Preben.Asmussen
similar experiences with Activemq. They choose HornetQ instead. I haven't tried that btw. Best, Preben -- View this message in context: http://camel.465427.n5.nabble.com/Transactional-Route-with-JTA-tp5773256p5773320.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Transactional Route with JTA

2015-11-01 Thread Christian Schneider
of the day we didn't get enough confidence in that Activemq jca adapter + jee server was the way to go. Too hard to get right, and I recall stuck transactions asf. Best, Preben -- View this message in context: http://camel.465427.n5.nabble.com/Transactional-Route-with-JTA-tp5773256p5773284.html Sent

Re: Transactional Route with JTA

2015-10-31 Thread Preben.Asmussen
in context: http://camel.465427.n5.nabble.com/Transactional-Route-with-JTA-tp5773256p5773284.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Transactional Route with JTA

2015-10-30 Thread Raul Kripalani
Alright. BTW, you also need to define a Resource Manager. In this repo is another set of examples: https://github.com/FuseByExample/camel-persistence-part2/blob/jboss-fuse-6.2/route-one-tx-manager/src/main/resources/OSGI-INF/blueprint/route-one-tx-manager.xml Regards, Raúl. On 30 Oct 2015 19:24,

Re: Transactional Route with JTA

2015-10-30 Thread Christian Schneider
Hi Raul, thanks for the link. I think for the most part I already followed this. I created my own spring JtaTransactionManager in blueprint though. Not sure if this makes a difference. I switched it to use the PlatformTransactionManager that aries transaction provides. Still I get no

Transactional Route with JTA

2015-10-30 Thread Christian Schneider
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

Re: Transactional Route with JTA

2015-10-30 Thread Raul Kripalani
Hi Christian, You need to plug in the JTA TransactionManager into the JMS consumer, so that the transaction is opened as part of the consumption. Otherwise, the transaction starts after the route kicks off and therefore doesn't cover the JMS consumption itself. Maybe this resource helps:

Re: Transactional Route with JTA

2015-10-30 Thread Christian Schneider
Hi Raul, thanks for the smx blueprint. The only difference I found was to use org.apache.activemq.jms.pool.JcaPooledConnectionFactory instead of the XaPooledConnectionFactory. I remember that I used this one for the tests in CXF JMS and it is the right one I think. So that should be a useful

Re: Transactional Route with JTA

2015-10-30 Thread Christian Schneider
I have now added more logging and see that I indeed have a JTA transaction and it seems to include the receive of the jms message. I also see that the transaction is rolled back when the error happens. So the only thing missing seems to be the redelivery. Any idea why that can happen?

Re: Transactional Route with JTA

2015-10-30 Thread Raul Kripalani
Hey Christian, I had a look at your code and I think you need to grab the XaConnectionFactory from the OSGi Service Registry (or create one). Not sure if you're using ServiceMix or not, but here is how SMX makes these services available in the container: