use of com.arjuna.ats.internal.jta.recovery.jts.XARecoveryModule in project narayana by jbosstm.
the class XARecoveryModuleUnitTest method testNull.
@Test
public void testNull() {
XARecoveryModule xarm = new XARecoveryModule();
xarm.periodicWorkFirstPass();
xarm.periodicWorkSecondPass();
}
use of com.arjuna.ats.internal.jta.recovery.jts.XARecoveryModule in project narayana by jbosstm.
the class XARecoveryModuleUnitTest method testRecover.
@Test
public void testRecover() throws Exception {
ArrayList<String> r = new ArrayList<String>();
TransactionImple tx = new TransactionImple();
assertTrue(tx.enlistResource(new RecoveryXAResource()));
SubordinateAtomicTransaction sat = new SubordinateAtomicTransaction(tx.get_uid(), tx.getTxId(), 0);
assertEquals(sat.doPrepare(), TwoPhaseOutcome.PREPARE_READONLY);
r.add("com.hp.mwtests.ts.jta.recovery.DummyXARecoveryResource");
jtaPropertyManager.getJTAEnvironmentBean().setXaResourceRecoveryClassNames(r);
XARecoveryModule xarm = new XARecoveryModule();
for (int i = 0; i < 11; i++) {
xarm.periodicWorkFirstPass();
xarm.periodicWorkSecondPass();
}
}
Aggregations