use of com.arjuna.ats.arjuna.exceptions.ObjectStoreException in project narayana by jbosstm.
the class TransactionRecoveryModule method periodicWorkSecondPass.
/*
* We may have caught some transactions in flight that are
* going to complete normally. We'll wait a short time
* before rechecking if they are still around. If so, we
* process them.
*/
protected void periodicWorkSecondPass() {
jtsLogger.i18NLogger.info_recovery_transactions_TransactionRecoveryModule_12();
// Process the Vector of transaction Uids
Enumeration transactionUidEnum = _transactionUidVector.elements();
while (transactionUidEnum.hasMoreElements()) {
Uid currentUid = (Uid) transactionUidEnum.nextElement();
try {
// Is the intentions list still there? Is this the best way to check?
if (_recoveryStore.currentState(currentUid, _transactionType) != StateStatus.OS_UNKNOWN) {
jtsLogger.i18NLogger.info_recovery_transactions_TransactionRecoveryModule_6(currentUid);
recoverTransaction(currentUid);
} else {
// Transaction has gone away - probably completed normally
if (jtsLogger.logger.isDebugEnabled()) {
jtsLogger.logger.debug("Transaction " + currentUid + " in state unknown (?)");
}
}
} catch (ObjectStoreException e4) {
if (jtsLogger.logger.isDebugEnabled()) {
jtsLogger.logger.debug("Transaction " + currentUid + " is not in object store - assumed completed");
}
}
}
}
use of com.arjuna.ats.arjuna.exceptions.ObjectStoreException in project narayana by jbosstm.
the class ServerTransactionRecoveryModule method periodicWorkSecondPass.
public void periodicWorkSecondPass() {
jtsLogger.i18NLogger.info_recovery_transactions_ServerTransactionRecoveryModule_4();
// super.periodicWorkSecondPass();
// Process the Vector of transaction Uids
Enumeration transactionUidEnum = _transactionUidVector.elements();
while (transactionUidEnum.hasMoreElements()) {
Uid currentUid = (Uid) transactionUidEnum.nextElement();
try {
// Is the intentions list still there? Is this the best way to check?
if (_recoveryStore.currentState(currentUid, _transactionType) != StateStatus.OS_UNKNOWN) {
jtsLogger.i18NLogger.info_recovery_transactions_ServerTransactionRecoveryModule_5(currentUid);
recoverTransaction(currentUid);
} else {
if (jtsLogger.logger.isDebugEnabled()) {
jtsLogger.logger.debug("ServerTransactionRecoveryModule - Transaction " + currentUid + " still in state unknown (?).");
}
}
} catch (ObjectStoreException e4) {
if (jtsLogger.logger.isDebugEnabled()) {
jtsLogger.logger.debug("ServerTransactionRecoveryModule - Transaction " + currentUid + " is not in object store - assumed completed");
}
}
}
}
use of com.arjuna.ats.arjuna.exceptions.ObjectStoreException in project narayana by jbosstm.
the class BACoordinatorRecoveryModule 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_ba_BACoordinatorRecoveryModule_3(currentUid, ex);
}
}
XTSBARecoveryManager.getRecoveryManager().setCoordinatorRecoveryStarted();
}
use of com.arjuna.ats.arjuna.exceptions.ObjectStoreException in project narayana by jbosstm.
the class BACoordinatorRecoveryModule method periodicWorkFirstPass.
/**
* This is called periodically by the RecoveryManager
*/
public void periodicWorkFirstPass() {
// Transaction type
boolean ACCoordinators = false;
// uids per transaction type
InputObjectState acc_uids = new InputObjectState();
try {
if (RecoveryLogger.logger.isDebugEnabled()) {
RecoveryLogger.logger.debug("BACoordinatorRecoveryModule: first pass");
}
ACCoordinators = _recoveryStore.allObjUids(_transactionType, acc_uids);
} catch (ObjectStoreException ex) {
RecoveryLogger.i18NLogger.warn_coordinator_ba_BACoordinatorRecoveryModule_1(ex);
}
if (ACCoordinators) {
_transactionUidVector = processTransactions(acc_uids);
}
}
use of com.arjuna.ats.arjuna.exceptions.ObjectStoreException in project narayana by jbosstm.
the class SubordinateBACoordinatorRecoveryModule 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_ba_SubordinateBACoordinatorRecoveryModule_3(currentUid, ex);
}
}
XTSBARecoveryManager.getRecoveryManager().setSubordinateCoordinatorRecoveryStarted();
}
Aggregations