Hi all,
As far as I understand there is no way one can programmatically do nested transactions in the CMT bean.
The only way to end up with nested transactions is when using BMT beans (i.e. session beans as entity beans must not use BMT). Eg,
// Get ref to two user transactions
UserTransaction ut1 = _context.getUserTransaction();
UserTransaction ut2 = _context.getUserTransaction();
// Begin first transaction
ut1.begin();
// Begin second transaction - NESTED TRANSACTION!!!
ut2.begin();
.....
The above piece of code demonstrates how nested transaction can occur. Nested transactions are prohibited in EJB and therefore, make sure that they are not occurring anywhere in your app.
