I have two UserTransaction - outer and inner. If I rollback outer, inner transaction rollbacks too by default. How I can to create new independent inner UserTransaction?
UserTransaction ut1 = new UserTransactionImp();
// some work 1
UserTransaction ut2 = new UserTransactionImp();
// some work 2 - I want to save this work!
Try using the UserTransactionManagerImp instead, and call suspend() right before starting the second transaction, like this:
TransactionManager utm = new UserTransactionManagerImp();
Transaction t1 = utm.suspend();
//start new tx - you can reuse the same utm instance or another
utm.resume ( t1 );
This topic is archived. No further replies will be accepted.Other recent topics