Package com.arjuna.ats.internal.jta.recovery.arjunacore

Examples of com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule


        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));
    }
View Full Code Here


        if(_recoveryManager == null) {
            log.warn("No recovery system from which to remove XAResourceRecovery instance");
            return;
        }

        XARecoveryModule xaRecoveryModule = null;
        for(RecoveryModule recoveryModule : ((Vector <RecoveryModule>)_recoveryManager.getModules())) {
            if(recoveryModule instanceof XARecoveryModule) {
                xaRecoveryModule = (XARecoveryModule)recoveryModule;
                break;
            }
        }

        if(xaRecoveryModule == null) {
            log.warn("No suitable recovery module in which to register XAResourceRecovery instance");
            return;
        }

        xaRecoveryModule.removeXAResourceRecoveryHelper(new XAResourceRecoveryHelperWrapper(xaResourceRecovery));
    }
View Full Code Here

        "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;
View Full Code Here

TOP

Related Classes of com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.