{
boolean passed = false;
try
{
UserTransaction ut = UserTransaction.getUserTransaction();
TransactionManager tm = TransactionManager.getTransactionManager();
DemoDurableParticipant p1 = new DemoDurableParticipant();
DemoDurableParticipant p2 = new DemoDurableParticipant();
DemoDurableParticipant p3 = new DemoDurableParticipant();
DemoDurableParticipant p4 = new DemoDurableParticipant();
ut.begin();
tm.enlistForDurableTwoPhase(p1, null);
tm.enlistForDurableTwoPhase(p2, null);
tm.enlistForDurableTwoPhase(p3, null);
tm.enlistForDurableTwoPhase(p4, null);
ut.commit();
passed = p1.passed() && p2.passed() && p3.passed() && p4.passed();
}
catch (Exception ex)
{