/** * 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 { 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");
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() == Status.StatusPrepared)) jtsLogger.i18NLogger.warn_recovery_transactions_RecoveredServerTransaction_10(get_uid()); theStatus = Status.StatusUnknown; jtsLogger.i18NLogger.warn_recovery_transactions_RecoveredServerTransaction_14(get_uid());
/** * 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 boolean assumeComplete () { final int heuristicDecision = getHeuristicDecision(); if (heuristicDecision == TwoPhaseOutcome.HEURISTIC_COMMIT || heuristicDecision == TwoPhaseOutcome.HEURISTIC_HAZARD || heuristicDecision == TwoPhaseOutcome.HEURISTIC_MIXED || heuristicDecision == TwoPhaseOutcome.HEURISTIC_ROLLBACK) { _typeName = AssumedCompleteHeuristicServerTransaction.typeName(); } else { _typeName = AssumedCompleteServerTransaction.typeName(); } return true; }
/** * 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); } }