From: Murthy G. <mur...@ho...> - 2015-06-17 20:01:59
|
Hi All: I am having problems with committing transactions using Hibernate + Bitronix where the call to persist occurs in another jar. For example, if I have jarA and jarB. JarA begins a transaction and calls a method in jarB. The method in jarB persists its data. Finally jarA commits the transaction. However, the commit doesn't go through as Bitronix throws an exception saying there is no transaction. Some relevant code: Jar A: void doStuffInJarA() { BitronixTransactionManager btm = TransactionManagerServices.getTransactionManager(); btm.begin(); callMethodInJarB(); btm.commit(); } ... Jar B: void callMethodInJarB() { MyDAO mydao = new MyDAO(); mydao.persist(myObject); } |