/** * Allows a new Resource to be added to the transaction. Typically this is * used to replace a Resource that has failed and cannot be recovered on * it's original IOR. */ public void addResourceRecord (Uid rcUid, Resource r) { Coordinator coord = null; AbstractRecord corbaRec = createOTSRecord(true, r, coord, rcUid); addRecord(corbaRec); }
public void removeOldStoreEntry () { try { store().remove_committed(getSavingUid(), super.type()); } catch (ObjectStoreException ex) { jtsLogger.loggerI18N.warn( "RecoveredServerTransaction.removeOldStoreEntry ", ex); } }
/** * Check the status of this transaction state, i.e., that represented by * get_uid and not getSavingUid */ public Status getOriginalStatus () { if (_recoveryStatus != RecoveryStatus.ACTIVATE_FAILED) { try { /* * Remember to get the status on the actual global transaction * and not on the local branch, i.e., use get_uid and not * getSavingUid */ return StatusChecker.get_status(get_uid(), _originalProcessUid); } catch (Inactive ex) { // shouldn't happen!! return Status.StatusUnknown; } } else { // if it can't be activated, we cant get the process uid return Status.StatusUnknown; } }
public void removeOldStoreEntry () { try { getStore().remove_committed(getSavingUid(), super.type()); } catch (ObjectStoreException ex) { jtsLogger.i18NLogger.warn_recoveredServerTransaction_removeOldStoreEntry(ex); } }
Status theStatus = get_status(); jtsLogger.logger.debug("RecoveredServerTransaction.replayPhase2("+get_uid()+") - status = "+Utility.stringStatus(theStatus)); theStatus = getStatusFromParent(); jtsLogger.logger.debug("RecoveredServerTransaction.replayPhase2("+get_uid()+") -" + " status after contacting parent = "+ Utility.stringStatus(theStatus)); || (theStatus == Status.StatusCommitted)) phase2Commit(_reportHeuristics); || (theStatus == Status.StatusNoTransaction)) phase2Abort(_reportHeuristics); jtsLogger.i18NLogger.info_recovery_transactions_RecoveredServerTransaction_6(get_uid()); _recoveryStatus = RecoveryStatus.REPLAY_FAILED; jtsLogger.logger.debug("RecoveredServerTransaction.replayPhase2: ("+get_uid()+") finished");
"com.arjuna.ats.internal.jts.recovery.transactions.RecoveredServerTransaction_1", new Object[] { getSavingUid() }); String effectiveTypeName = typeName(); if ((store().currentState(getSavingUid(), effectiveTypeName) != ObjectStore.OS_UNKNOWN)) if (activate()) _recoveryStatus = RecoveryStatus.ACTIVATED; else "com.arjuna.ats.internal.jts.recovery.transactions.RecoveredServerTransaction_2", new Object[] { getSavingUid() }); "com.arjuna.ats.internal.jts.recovery.transactions.RecoveredServerTransaction_2", new Object[] { getSavingUid(), e });
jtsLogger.logger.debug("RecoveredServerTransaction "+getSavingUid()+" created"); String effectiveTypeName = typeName(); if ((StoreManager.getRecoveryStore().currentState(getSavingUid(), effectiveTypeName) != StateStatus.OS_UNKNOWN)) if (activate()) _recoveryStatus = RecoveryStatus.ACTIVATED; else { jtsLogger.i18NLogger.warn_recovery_transactions_RecoveredServerTransaction_2(getSavingUid()); jtsLogger.i18NLogger.warn_recovery_transactions_RecoveredServerTransaction_2(getSavingUid());
&& (get_status() == org.omg.CosTransactions.Status.StatusPrepared)) jtsLogger.i18NLogger.warn_recovery_transactions_RecoveredServerTransaction_10(get_uid()); theStatus = Status.StatusUnknown; jtsLogger.i18NLogger.warn_recovery_transactions_RecoveredServerTransaction_14(get_uid());
_transaction = new RecoveredServerTransaction(_uid); if ( firstLoad && _transaction.getRecoveryStatus() == RecoveryStatus.ACTIVATE_FAILED) {
Status theStatus = get_status(); "com.arjuna.ats.internal.jts.recovery.transactions.RecoveredServerTransaction_4", new Object[] { get_uid(), Utility.stringStatus(theStatus) }); theStatus = getStatusFromParent(); "com.arjuna.ats.internal.jts.recovery.transactions.RecoveredServerTransaction_5", new Object[] { get_uid(), Utility.stringStatus(theStatus) }); || (theStatus == Status.StatusCommitted)) phase2Commit(_reportHeuristics); || (theStatus == Status.StatusNoTransaction)) phase2Abort(_reportHeuristics); "com.arjuna.ats.internal.jts.recovery.transactions.RecoveredServerTransaction_6", new Object[] { get_uid() }); "com.arjuna.ats.internal.jts.recovery.transactions.RecoveredServerTransaction_8", new Object[] { get_uid() });
&& (get_status() == org.omg.CosTransactions.Status.StatusPrepared)) "com.arjuna.ats.internal.jts.recovery.transactions.RecoveredServerTransaction_10", new Object[] { get_uid() }); theStatus = org.omg.CosTransactions.Status.StatusRolledBack; "com.arjuna.ats.internal.jts.recovery.transactions.RecoveredServerTransaction_14", new Object[] { get_uid() });
_transaction = new RecoveredServerTransaction(_uid); if ( firstLoad && _transaction.getRecoveryStatus() == RecoveryStatus.ACTIVATE_FAILED) {
/** * Allows a new Resource to be added to the transaction. Typically this is * used to replace a Resource that has failed and cannot be recovered on * it's original IOR. */ public void addResourceRecord (Uid rcUid, Resource r) { Coordinator coord = null; AbstractRecord corbaRec = createOTSRecord(true, r, coord, rcUid); addRecord(corbaRec); }
/** * Check the status of this transaction state, i.e., that represented by * get_uid and not getSavingUid */ public Status getOriginalStatus () { if (_recoveryStatus != RecoveryStatus.ACTIVATE_FAILED) { try { /* * Remember to get the status on the actual global transaction * and not on the local branch, i.e., use get_uid and not * getSavingUid */ return StatusChecker.get_status(get_uid(), _originalProcessUid); } catch (Inactive ex) { // shouldn't happen!! return Status.StatusUnknown; } } else { // if it can't be activated, we cant get the process uid return Status.StatusUnknown; } }
/** * Override StateManager packHeader so it gets the original processUid, not * this process's * * @since JTS 2.1. */ protected void packHeader (OutputObjectState os, Header hdr) throws IOException { /* * If there is a transaction present than pack the process Uid of this * JVM and the tx id. Otherwise pack a null Uid. */ super.packHeader(os, new Header(get_uid(), _originalProcessUid)); }
/** * Override StateManager packHeader so it gets the original processUid, not * this process's * * @since JTS 2.1. */ protected void packHeader (OutputObjectState os, Header hdr) throws IOException { /* * If there is a transaction present than pack the process Uid of this * JVM and the tx id. Otherwise pack a null Uid. */ super.packHeader(os, new Header(get_uid(), _originalProcessUid)); }
/** * Override StateManager's unpackHeader to save the processUid of the * original process * * @since JTS 2.1. */ protected void unpackHeader (InputObjectState os, Header hdr) throws IOException { super.unpackHeader(os, hdr); //super.objectUid = hdr.getTxId(); _originalProcessUid = hdr.getProcessId(); if (jtsLogger.logger.isDebugEnabled()) { jtsLogger.logger.debug("RecoveredServerTransaction.unpackHeader - txid = " + get_uid() + " and processUid = "+_originalProcessUid); } }
/** * Override StateManager's unpackHeader to save the processUid of the * original process * * @since JTS 2.1. */ protected void unpackHeader (InputObjectState os, Header hdr) throws IOException { super.unpackHeader(os, hdr); super.objectUid = hdr.getTxId(); _originalProcessUid = hdr.getProcessId(); if (jtsLogger.loggerI18N.isDebugEnabled()) { jtsLogger.loggerI18N .debug( DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC, FacilityCode.FAC_CRASH_RECOVERY, "com.arjuna.ats.internal.jts.recovery.transactions.RecoveredServerTransaction_16", new Object[] { get_uid(), _originalProcessUid }); } }