"com.arjuna.ats.internal.arjuna.recovery.AtomicActionRecoveryModule");
System.setProperty(RecoveryEnvironment.MODULE_PROPERTY_PREFIX + ".2",
"com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule");
RecoveryManager.manager().initialize();
XARecoveryModule xaRecoveryModule = null;
for (RecoveryModule recoveryModule : ((Vector<RecoveryModule>) RecoveryManager
.manager().getModules())) {
if (recoveryModule instanceof XARecoveryModule) {
xaRecoveryModule = (XARecoveryModule) recoveryModule;
break;
}
}
if (xaRecoveryModule == null) {
throw new Exception("No XARM");
}
XAResource firstResource = new SimpleResource();
Object toWakeUp = new Object();
final SimpleResourceXA_RETRY secondResource = new SimpleResourceXA_RETRY(
toWakeUp);
xaRecoveryModule
.addXAResourceRecoveryHelper(new XAResourceRecoveryHelper() {
public boolean initialise(String p) throws Exception {
// TODO Auto-generated method stub
return true;