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

Popular posts from this blog

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -