/** * 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'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); } }
jtsLogger.logger.debug("RecoveredServerTransaction.replayPhase2("+get_uid()+") - status = "+Utility.stringStatus(theStatus)); jtsLogger.logger.debug("RecoveredServerTransaction.replayPhase2("+get_uid()+") -" + " status after contacting parent = "+ Utility.stringStatus(theStatus)); jtsLogger.i18NLogger.info_recovery_transactions_RecoveredServerTransaction_6(get_uid()); _recoveryStatus = RecoveryStatus.REPLAY_FAILED; jtsLogger.logger.debug("RecoveredServerTransaction.replayPhase2: ("+get_uid()+") finished");