use of com.arjuna.ats.internal.jts.orbspecific.ControlImple in project narayana by jbosstm.
the class TransactionFactoryUnitTest method testCompare.
@Test
public void testCompare() throws Exception {
TransactionFactoryImple factory = new TransactionFactoryImple("test");
ControlImple tx = factory.createLocal(1000);
Control proxy = factory.getTransaction(Utility.uidToOtid(tx.get_uid()));
assertTrue(Utility.getUid(proxy).equals(tx.get_uid()));
try {
tx.getImplHandle().rollback();
} catch (final Throwable ex) {
}
}
use of com.arjuna.ats.internal.jts.orbspecific.ControlImple in project narayana by jbosstm.
the class ServerNestedOSIActionUnitTest method testRollback.
@Test
public void testRollback() throws Exception {
ControlImple cont = new ControlImple(null, null);
Control theControl = cont.getControl();
ArjunaTransactionImple tx = cont.getImplHandle();
ServerControl sc = new ServerControl(tx.get_uid(), theControl, tx, theControl.get_coordinator(), theControl.get_terminator());
ServerOSINestedAction act = new ServerOSINestedAction(sc, true);
act.rollback_subtransaction();
}
use of com.arjuna.ats.internal.jts.orbspecific.ControlImple in project narayana by jbosstm.
the class ServerNestedActionUnitTest method test.
@Test
public void test() throws Exception {
ControlImple cont = new ControlImple(null, null);
Control theControl = cont.getControl();
ArjunaTransactionImple tx = cont.getImplHandle();
ServerControl sc = new ServerControl(tx.get_uid(), theControl, tx, theControl.get_coordinator(), theControl.get_terminator());
ServerNestedAction act = new ServerNestedAction(sc);
try {
act.prepare();
fail();
} catch (final BAD_OPERATION ex) {
}
act.commit();
act.rollback();
act.commit_one_phase();
assertTrue(act.theResource() != null);
}
use of com.arjuna.ats.internal.jts.orbspecific.ControlImple in project narayana by jbosstm.
the class ServerNestedActionUnitTest method testNestedCommit.
@Test
public void testNestedCommit() throws Exception {
ControlImple cont = new ControlImple(null, null);
Control theControl = cont.getControl();
ArjunaTransactionImple tx = cont.getImplHandle();
ServerControl sc = new ServerControl(tx.get_uid(), theControl, tx, theControl.get_coordinator(), theControl.get_terminator());
ServerNestedAction act = new ServerNestedAction(sc);
act.commit_subtransaction(null);
}
use of com.arjuna.ats.internal.jts.orbspecific.ControlImple in project narayana by jbosstm.
the class ServerNestedActionUnitTest method testNestedRollback.
@Test
public void testNestedRollback() throws Exception {
ControlImple cont = new ControlImple(null, null);
Control theControl = cont.getControl();
ArjunaTransactionImple tx = cont.getImplHandle();
ServerControl sc = new ServerControl(tx.get_uid(), theControl, tx, theControl.get_coordinator(), theControl.get_terminator());
ServerNestedAction act = new ServerNestedAction(sc);
act.rollback_subtransaction();
}
Aggregations