{
public static void testSubTransactionRollback()
throws Exception
{
final UserTransaction ut = UserTransactionFactory.userTransaction();
final UserTransaction ust = UserTransactionFactory.userSubordinateTransaction();
final TransactionManager tm = TransactionManager.getTransactionManager();
final DemoDurableParticipant p1 = new DemoDurableParticipant();
final DemoVolatileParticipant p2 = new DemoVolatileParticipant();
final DemoDurableParticipant p3 = new DemoDurableParticipant();
final DemoVolatileParticipant p4 = new DemoVolatileParticipant();
ut.begin();
final TxContext tx = tm.suspend();
tm.resume(tx);
tm.enlistForDurableTwoPhase(p1, p1.identifier());
tm.enlistForVolatileTwoPhase(p2, p2.identifier());
ust.begin();
final TxContext stx = tm.suspend();
tm.resume(stx);
tm.enlistForDurableTwoPhase(p3, p3.identifier());
tm.enlistForVolatileTwoPhase(p4, p4.identifier());