java - How to use several UserTransactions (javax) -
java - How to use several UserTransactions (javax) -
let's have bean method uses
@inject private usertransaction utx; utx.begin();
and want test method indirectly calls above. before, in test setup, phone call this:
@before public void setup() throws exception { utx.begin(); }
so testclass , bean both have injected javax.transaction.usertransaction object. calling sec (bean) utx.begin() lead error: javax.transaction.notsupportedexception: basetransaction.checktransactionstate - arjuna016051: thread associated transaction!
how can utilize several usertransactions, i.e. when rollback outer one, want rollback inner one, if has been committed?
java transactions
Comments
Post a Comment