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);
}                                         
------------------------------------------------------------------------------
_______________________________________________
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to