use of com.arjuna.ats.internal.jts.interposition.FactoryList in project narayana by jbosstm.
the class FactoryListUnitTest method test.
@SuppressWarnings("static-access")
@Test
public void test() throws Exception {
FactoryList factory = new FactoryList();
factory.removeDefault();
try {
assertNull(factory.recreate(null, FactoryList.DEFAULT_ID));
fail();
} catch (final INVALID_TRANSACTION ex) {
} catch (final Throwable ex) {
fail();
}
FactoryList.remove(Arjuna.restrictedXID());
TransactionFactoryImple imple = new TransactionFactoryImple("test");
ControlImple tx = imple.createLocal(1000);
PropagationContext ctx = tx.get_coordinator().get_txcontext();
Control cont = FactoryList.recreate(ctx, Arjuna.XID());
assertTrue(Utility.getUid(cont).equals(tx.get_uid()));
}
Aggregations