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

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -