use of com.arjuna.ats.internal.jbossatx.jta.XAResourceRecoveryHelperWrapper in project narayana by jbosstm.
the class RecoveryManagerService method addXAResourceRecovery.
// ////////////////////////////
public void addXAResourceRecovery(XAResourceRecovery xaResourceRecovery) {
if (_recoveryManager == null) {
throw new IllegalStateException(jbossatxLogger.i18NLogger.get_jta_RecoveryManagerService_norecoverysystem());
}
XARecoveryModule xaRecoveryModule = null;
for (RecoveryModule recoveryModule : ((Vector<RecoveryModule>) _recoveryManager.getModules())) {
if (recoveryModule instanceof XARecoveryModule) {
xaRecoveryModule = (XARecoveryModule) recoveryModule;
break;
}
}
if (xaRecoveryModule == null) {
throw new IllegalStateException(jbossatxLogger.i18NLogger.get_jta_RecoveryManagerService_norecoverymodule());
}
xaRecoveryModule.addXAResourceRecoveryHelper(new XAResourceRecoveryHelperWrapper(xaResourceRecovery));
}
use of com.arjuna.ats.internal.jbossatx.jta.XAResourceRecoveryHelperWrapper in project narayana by jbosstm.
the class RecoveryManagerService method removeXAResourceRecovery.
public void removeXAResourceRecovery(XAResourceRecovery xaResourceRecovery) {
if (_recoveryManager == null) {
throw new IllegalStateException(jbossatxLogger.i18NLogger.get_jta_RecoveryManagerService_norecoverysystem());
}
XARecoveryModule xaRecoveryModule = null;
for (RecoveryModule recoveryModule : ((Vector<RecoveryModule>) _recoveryManager.getModules())) {
if (recoveryModule instanceof XARecoveryModule) {
xaRecoveryModule = (XARecoveryModule) recoveryModule;
break;
}
}
if (xaRecoveryModule == null) {
throw new IllegalStateException(jbossatxLogger.i18NLogger.get_jta_RecoveryManagerService_norecoverymodule());
}
xaRecoveryModule.removeXAResourceRecoveryHelper(new XAResourceRecoveryHelperWrapper(xaResourceRecovery));
}
Aggregations