use of com.arjuna.ats.internal.jts.orbspecific.interposition.coordinator.ServerTransaction in project narayana by jbosstm.
the class ServerFactoryUnitTest method testGetOSStatusWithArjunaTransactionImple.
@Test
public void testGetOSStatusWithArjunaTransactionImple() throws Exception {
final Uid uid = new Uid();
final OutputObjectState outputObjectState = new OutputObjectState();
final ServerTransaction transaction = new ServerTransaction(uid, null);
transaction.save_state(outputObjectState, ObjectType.ANDPERSISTENT);
StoreManager.getRecoveryStore().write_committed(uid, ServerTransaction.typeName(), outputObjectState);
Assert.assertEquals(Status.StatusCommitted, ServerFactory.getOSStatus(uid));
}
use of com.arjuna.ats.internal.jts.orbspecific.interposition.coordinator.ServerTransaction in project narayana by jbosstm.
the class ServerTransactionUnitTest method testPrepareRollback.
@Test
public void testPrepareRollback() throws Exception {
ServerTransaction sc = new ServerTransaction(new Uid(), null);
// readonly so we commit here
assertEquals(sc.doPrepare(), TwoPhaseOutcome.PREPARE_READONLY);
// Due to the readonly we allow the massage
assertEquals(sc.doPhase2Abort(), ActionStatus.ABORTED);
}
Aggregations