@Resource TransactionManager transactionManager; should work
Romain Manni-Bucau @rmannibucau <https://twitter.com/rmannibucau> | Blog <https://blog-rmannibucau.rhcloud.com> | Old Wordpress Blog <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> | LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber <http://www.tomitribe.com> | JavaEE Factory <https://javaeefactory-rmannibucau.rhcloud.com> 2016-07-29 18:56 GMT+02:00 dimas <[email protected]>: > Antonin, yes, It helped a lot! > > I can see the transaction committed successfully and message persisted > after > I used your advice and injected transaction and manager like this: > > @Resource > UserTransaction userTransaction; > > @Resource(lookup = "java:comp/env/TransactionManager") > TransactionManager transactionManager; > > > However, when i step with debugger in the producer method I can see that > 'transactionManager' is null (userTransaction reference is Ok) probably > because I'm using wrong lookup string for TomEE, so the produced > JtaTransactionManager is not fully initialised. > Not sure if it is a big deal (as i said it works), but it will be nice to > figure out how to use it properly in TomEE environment. > > Cheers, > Dmitry > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Camel-JPA-JTA-Transaction-TomEE-tp5785642p5785646.html > Sent from the Camel - Users mailing list archive at Nabble.com. >
