Search in sources :

Example 1 with XAResourceRecoveryHelperWrapper

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));
}
Also used : XAResourceRecoveryHelperWrapper(com.arjuna.ats.internal.jbossatx.jta.XAResourceRecoveryHelperWrapper) RecoveryModule(com.arjuna.ats.arjuna.recovery.RecoveryModule) XARecoveryModule(com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule) XARecoveryModule(com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule)

Example 2 with XAResourceRecoveryHelperWrapper

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));
}
Also used : XAResourceRecoveryHelperWrapper(com.arjuna.ats.internal.jbossatx.jta.XAResourceRecoveryHelperWrapper) RecoveryModule(com.arjuna.ats.arjuna.recovery.RecoveryModule) XARecoveryModule(com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule) XARecoveryModule(com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule)

Aggregations

RecoveryModule (com.arjuna.ats.arjuna.recovery.RecoveryModule)2 XAResourceRecoveryHelperWrapper (com.arjuna.ats.internal.jbossatx.jta.XAResourceRecoveryHelperWrapper)2 XARecoveryModule (com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule)2