use of com.hp.mwtests.ts.jta.jts.common.Synchronization in project narayana by jbosstm.
the class TransactionImpleUnitTest method testSynchronization.
@Test
public void testSynchronization() throws Exception {
ThreadActionData.purgeActions();
OTSImpleManager.current().contextManager().purgeActions();
TransactionImple tx = new TransactionImple();
tx.registerSynchronization(new Synchronization());
assertTrue(tx.getSynchronizations().size() == 1);
tx.setRollbackOnly();
try {
tx.registerSynchronization(new Synchronization());
fail();
} catch (final RollbackException ex) {
}
tx.rollback();
}
Aggregations