Class Trace

java.lang.Object
org.jpos.transaction.participant.Trace
All Implemented Interfaces:
Configurable, AbortParticipant, TransactionConstants, TransactionParticipant

public class Trace extends Object implements AbortParticipant, Configurable
  • Constructor Details

  • Method Details

    • prepare

      public int prepare(long id, Serializable o)
      Description copied from interface: TransactionParticipant
      Called by TransactionManager in preparation for a transaction
      Specified by:
      prepare in interface TransactionParticipant
      Parameters:
      id - the Transaction identifier
      o - transaction context
      Returns:
      PREPARED or ABORTED (| NO_JOIN | READONLY)
    • commit

      public void commit(long id, Serializable o)
      Description copied from interface: TransactionParticipant
      Called by TransactionManager upon transaction commit. Warning: implementation should be able to handle multiple calls with the same transaction id (rare crash recovery)
      Specified by:
      commit in interface TransactionParticipant
      Parameters:
      id - the Transaction identifier
      o - transaction context
    • abort

      public void abort(long id, Serializable o)
      Description copied from interface: TransactionParticipant
      Called by TransactionManager upon transaction commit. Warning: implementation should be able to handle multiple calls with the same transaction id (rare crash recovery)
      Specified by:
      abort in interface TransactionParticipant
      Parameters:
      id - the Transaction identifier
      o - transaction context
    • prepareForAbort

      public int prepareForAbort(long id, Serializable o)
      Description copied from interface: AbortParticipant
      Called by TransactionManager in preparation for a transaction that is known to abort.
      Specified by:
      prepareForAbort in interface AbortParticipant
      Parameters:
      id - the Transaction identifier
      o - transaction context
      Returns:
      0 [| NO_JOIN | READONLY)
    • setConfiguration

      public void setConfiguration(Configuration cfg)
      Specified by:
      setConfiguration in interface Configurable
      Parameters:
      cfg - Configuration object