if(_recoveryManager == null) {
log.error("No recovery system in which to register XAResourceRecovery instance");
throw new IllegalStateException("No recovery system present in this server");
}
XARecoveryModule xaRecoveryModule = null;
for(RecoveryModule recoveryModule : ((Vector<RecoveryModule>)_recoveryManager.getModules())) {
if(recoveryModule instanceof XARecoveryModule) {
xaRecoveryModule = (XARecoveryModule)recoveryModule;
break;
}
}
if(xaRecoveryModule == null) {
log.error("No suitable recovery module in which to register XAResourceRecovery instance");
throw new IllegalStateException("No xa recovery module present in this server");
}
xaRecoveryModule.addXAResourceRecoveryHelper(new XAResourceRecoveryHelperWrapper(xaResourceRecovery));
}