Class AssumedCompleteServerTransaction

All Implemented Interfaces:
ArjunaTransactionOperations, UidCoordinatorOperations, Reapable, RecoveringTransaction, CoordinatorOperations, TerminatorOperations

public class AssumedCompleteServerTransaction extends RecoveredServerTransaction
Transaction relic of a committed transaction that did not get committed responses from all resources/subordinates. Recovery will not be attempted unless a replay completion is received, in which case it is reactivated.

Several of the methods of OTS_Transaction could be simplified for an AssumedCompleteServerTransaction (e.g. the status must be committed), but they are kept the same to simplify maintenance

Version:
$Id: AssumedCompleteServerTransaction.java 2342 2006-03-30 13:06:17Z $
Author:
Peter Furniss (peter.furniss@arjuna.com)
  • Constructor Details

    • AssumedCompleteServerTransaction

      public AssumedCompleteServerTransaction(Uid actionUid)
  • Method Details

    • getOriginalStatus

      public Status getOriginalStatus()
      the original process must be deceased if we are assumed complete
      Specified by:
      getOriginalStatus in interface RecoveringTransaction
      Overrides:
      getOriginalStatus in class RecoveredServerTransaction
    • type

      public String type()
      Description copied from class: TwoPhaseCoordinator
      Overloads BasicAction.type()
      Specified by:
      type in interface RecoveringTransaction
      Overrides:
      type in class RecoveredServerTransaction
    • typeName

      public static String typeName()
      typeName differs from original to force the ActionStore to keep AssumedCompleteServerTransactions separate
    • toString

      public String toString()
      Description copied from class: BasicAction
      Overloads Object.toString()
      Overrides:
      toString in class ServerTransaction
    • assumeComplete

      public boolean assumeComplete()
      This T is already assumed complete, so return false
      Specified by:
      assumeComplete in interface RecoveringTransaction
      Overrides:
      assumeComplete in class RecoveredServerTransaction
    • getLastActiveTime

      public Date getLastActiveTime()
      Description copied from class: RecoveredServerTransaction
      do not admit to being inactive
      Specified by:
      getLastActiveTime in interface RecoveringTransaction
      Overrides:
      getLastActiveTime in class RecoveredServerTransaction
    • restore_state

      public boolean restore_state(InputObjectState objectState, int ot)
      Description copied from class: BasicAction
      This assumes the various lists are zero length when it is called.
      Overrides:
      restore_state in class ServerTransaction
      Returns:
      true if successful, false otherwise.
    • save_state

      public boolean save_state(OutputObjectState objectState, int ot)
      Description copied from class: BasicAction
      Redefined version of save_state and restore_state from StateManager. Normal operation (no crashes): BasicAction.save_state is called after a successful prepare. This causes and BasicAction object to be saved in the object store. This object contains primarily the "intentions list" of the BasicAction. After successfully completing phase 2 of the commit protocol, the BasicAction object is deleted from the store. Failure cases: If a server crashes after successfully preparing, then upon recovery the action must be resolved (either committed or aborted) depending upon whether the co-ordinating atomic action committed or aborted. Upon server recovery, the crash recovery mechanism detects ServerBasicAction objects in the object store and attempts to activate the BasicAction object of the co-ordinating action. If this is successful then the SAA is committed else aborted. If, when processing phase 2 of the commit protocol, the co-ordinator experiences a failure to commit from one of the records then the BasicAction object is NOT deleted. It is rewritten when a new state which contains a list of the records that failed during phase 2 commit. This list is called the "failedList". The crash recovery manager will detect local BasicAction objects in addition to SAA objects in the objectstore. An attempt will be made to commit these actions. If the action contained a call to a now dead server, this action can never be resolved and the AA object can never be removed. However, if the action is purely local then after the processing is complete the removed by crash recovery.
      Overrides:
      save_state in class RecoveredServerTransaction
      Returns:
      true if successful, false otherwise.