Search in sources :

Example 36 with ObjectStoreException

use of com.arjuna.ats.arjuna.exceptions.ObjectStoreException in project narayana by jbosstm.

the class RecoverConnectableAtomicActionBean method createWrapper.

@Override
protected ActionBeanWrapperInterface createWrapper(UidWrapper w, boolean activate) {
    try {
        InputObjectState state = StoreManager.getRecoveryStore().read_committed(w.getUid(), RecoverConnectableAtomicAction.CONNECTABLE_ATOMIC_ACTION_TYPE);
        connectableAtomicAction = new RecoverConnectableAtomicAction(RecoverConnectableAtomicAction.CONNECTABLE_ATOMIC_ACTION_TYPE, w.getUid(), state);
    } catch (ObjectStoreException e) {
        ;
    } catch (IOException e) {
        ;
    }
    GenericAtomicActionWrapper action = new GenericAtomicActionWrapper(connectableAtomicAction, w);
    if (activate)
        action.activate();
    return action;
}
Also used : InputObjectState(com.arjuna.ats.arjuna.state.InputObjectState) ObjectStoreException(com.arjuna.ats.arjuna.exceptions.ObjectStoreException) RecoverConnectableAtomicAction(com.arjuna.ats.internal.jta.recovery.arjunacore.RecoverConnectableAtomicAction) IOException(java.io.IOException)

Example 37 with ObjectStoreException

use of com.arjuna.ats.arjuna.exceptions.ObjectStoreException in project narayana by jbosstm.

the class ATCoordinatorRecoveryModule method processTransactionsStatus.

private void processTransactionsStatus() {
    // Process the Vector of transaction Uids
    Enumeration transactionUidEnum = _transactionUidVector.elements();
    while (transactionUidEnum.hasMoreElements()) {
        Uid currentUid = (Uid) transactionUidEnum.nextElement();
        try {
            if (_recoveryStore.currentState(currentUid, _transactionType) != StateStatus.OS_UNKNOWN) {
                doRecoverTransaction(currentUid);
            }
        } catch (ObjectStoreException ex) {
            RecoveryLogger.i18NLogger.warn_coordinator_at_ATCoordinatorRecoveryModule_3(currentUid, ex);
        }
    }
    XTSATRecoveryManager.getRecoveryManager().setCoordinatorRecoveryStarted();
}
Also used : Uid(com.arjuna.ats.arjuna.common.Uid) ObjectStoreException(com.arjuna.ats.arjuna.exceptions.ObjectStoreException) Enumeration(java.util.Enumeration)

Example 38 with ObjectStoreException

use of com.arjuna.ats.arjuna.exceptions.ObjectStoreException in project narayana by jbosstm.

the class SubordinateATCoordinatorRecoveryModule method processTransactionsStatus.

private void processTransactionsStatus() {
    // Process the Vector of transaction Uids
    Enumeration transactionUidEnum = _transactionUidVector.elements();
    while (transactionUidEnum.hasMoreElements()) {
        Uid currentUid = (Uid) transactionUidEnum.nextElement();
        try {
            if (_recoveryStore.currentState(currentUid, _transactionType) != StateStatus.OS_UNKNOWN) {
                doRecoverTransaction(currentUid);
            }
        } catch (ObjectStoreException ex) {
            RecoveryLogger.i18NLogger.warn_coordinator_at_SubordinateATCoordinatorRecoveryModule_3(currentUid, ex);
        }
    }
    XTSATRecoveryManager.getRecoveryManager().setSubordinateCoordinatorRecoveryStarted();
}
Also used : Uid(com.arjuna.ats.arjuna.common.Uid) ObjectStoreException(com.arjuna.ats.arjuna.exceptions.ObjectStoreException) Enumeration(java.util.Enumeration)

Example 39 with ObjectStoreException

use of com.arjuna.ats.arjuna.exceptions.ObjectStoreException in project narayana by jbosstm.

the class SubordinateATCoordinatorRecoveryModule method periodicWorkFirstPass.

/**
 * This is called periodically by the RecoveryManager
 */
public void periodicWorkFirstPass() {
    // Transaction type
    boolean SubordinateCoordinators = false;
    // uids per transaction type
    InputObjectState acc_uids = new InputObjectState();
    try {
        if (RecoveryLogger.logger.isDebugEnabled()) {
            RecoveryLogger.logger.debug("StatusModule: first pass ");
        }
        SubordinateCoordinators = _recoveryStore.allObjUids(_transactionType, acc_uids);
    } catch (ObjectStoreException ex) {
        RecoveryLogger.i18NLogger.warn_coordinator_at_SubordinateATCoordinatorRecoveryModule_1(ex);
    }
    if (SubordinateCoordinators) {
        _transactionUidVector = processTransactions(acc_uids);
    }
}
Also used : InputObjectState(com.arjuna.ats.arjuna.state.InputObjectState) ObjectStoreException(com.arjuna.ats.arjuna.exceptions.ObjectStoreException)

Example 40 with ObjectStoreException

use of com.arjuna.ats.arjuna.exceptions.ObjectStoreException in project narayana by jbosstm.

the class BAParticipantRecoveryModule method periodicWorkFirstPass.

/**
 * This is called periodically by the RecoveryManager
 */
public void periodicWorkFirstPass() {
    // Transaction type
    boolean BAParticipants = false;
    // uids per transaction type
    InputObjectState acc_uids = new InputObjectState();
    try {
        if (RecoveryLogger.logger.isDebugEnabled()) {
            RecoveryLogger.logger.debug("BAParticipantRecoveryModule: first pass");
        }
        BAParticipants = _recoveryStore.allObjUids(_participantType, acc_uids);
    } catch (ObjectStoreException ex) {
        RecoveryLogger.i18NLogger.warn_participant_ba_BAParticipantRecoveryModule_1(ex);
    }
    if (BAParticipants) {
        _participantUidVector = processParticipants(acc_uids);
    }
}
Also used : InputObjectState(com.arjuna.ats.arjuna.state.InputObjectState) ObjectStoreException(com.arjuna.ats.arjuna.exceptions.ObjectStoreException)

Aggregations

ObjectStoreException (com.arjuna.ats.arjuna.exceptions.ObjectStoreException)87 IOException (java.io.IOException)44 Uid (com.arjuna.ats.arjuna.common.Uid)35 InputObjectState (com.arjuna.ats.arjuna.state.InputObjectState)34 OutputObjectState (com.arjuna.ats.arjuna.state.OutputObjectState)23 File (java.io.File)11 Connection (java.sql.Connection)9 PreparedStatement (java.sql.PreparedStatement)9 SQLException (java.sql.SQLException)9 NamingException (javax.naming.NamingException)9 Enumeration (java.util.Enumeration)8 RecoveryStore (com.arjuna.ats.arjuna.objectstore.RecoveryStore)6 FileNotFoundException (java.io.FileNotFoundException)5 ResultSet (java.sql.ResultSet)5 ArrayList (java.util.ArrayList)5 ParticipantStore (com.arjuna.ats.arjuna.objectstore.ParticipantStore)4 XidImple (com.arjuna.ats.jta.xa.XidImple)4 RandomAccessFile (java.io.RandomAccessFile)3 SyncFailedException (java.io.SyncFailedException)3 Statement (java.sql.Statement)3