use of com.arjuna.wstx.tests.common.DemoDurableParticipant in project narayana by jbosstm.
the class RollbackExceptionInRollbackTest method testRollbackExceptionInRollback.
@Test
public void testRollbackExceptionInRollback() throws Exception {
UserTransaction ut = UserTransaction.getUserTransaction();
TransactionManager tm = TransactionManager.getTransactionManager();
FailureParticipant p1 = new FailureParticipant(FailureParticipant.FAIL_IN_ROLLBACK, FailureParticipant.WRONG_STATE);
DemoDurableParticipant p2 = new DemoDurableParticipant();
ut.begin();
try {
tm.enlistForDurableTwoPhase(p1, "failure");
tm.enlistForDurableTwoPhase(p2, p2.identifier());
} catch (Exception eouter) {
try {
ut.rollback();
} catch (Exception einner) {
}
throw eouter;
}
ut.rollback();
}
Aggregations