use of org.omg.CosTransactions.Control 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 org.omg.CosTransactions.Control 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 org.omg.CosTransactions.Control 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 org.omg.CosTransactions.Control 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();
}
use of org.omg.CosTransactions.Control in project narayana by jbosstm.
the class ServerNestedStrictUnitTest 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());
ServerStrictNestedAction act = new ServerStrictNestedAction(sc, true);
act.rollback_subtransaction();
}
Aggregations