use of com.arjuna.ats.internal.jts.orbspecific.interposition.resources.arjuna.ServerNestedAction in project narayana by jbosstm.
the class ServerResource method tidyup.
protected void tidyup() {
synchronized (_children) {
while (_children.size() > 0) {
ServerNestedAction child = _children.remove(0);
child.setParentHandle(null);
try {
ORBManager.getPOA().shutdownObject(child.theResource());
} catch (Exception e) {
}
}
}
if (_theControl != null) {
if (_theControl.isWrapper()) {
try {
// will delete itself
_theControl.destroy();
} catch (Exception e) {
}
}
_theControl = null;
}
}
use of com.arjuna.ats.internal.jts.orbspecific.interposition.resources.arjuna.ServerNestedAction 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.interposition.resources.arjuna.ServerNestedAction 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.interposition.resources.arjuna.ServerNestedAction 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