use of com.arjuna.ats.internal.jts.orbspecific.coordinator.ArjunaTransactionImple 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.coordinator.ArjunaTransactionImple 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.coordinator.ArjunaTransactionImple 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 com.arjuna.ats.internal.jts.orbspecific.coordinator.ArjunaTransactionImple 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();
}
use of com.arjuna.ats.internal.jts.orbspecific.coordinator.ArjunaTransactionImple in project narayana by jbosstm.
the class ServerRecoveryTopLevelUnitTest 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());
DummyServerRecovery act = new DummyServerRecovery(sc);
act.destroyResource();
}
Aggregations