Class BAParticipantRecoveryRecord

java.lang.Object
org.jboss.jbossts.xts.recovery.participant.ba.BAParticipantRecoveryRecord
All Implemented Interfaces:
PersistableParticipant
Direct Known Subclasses:
BAParticipantRecoveryRecord

public abstract class BAParticipantRecoveryRecord extends Object implements PersistableParticipant
asbstract class used to implement save, recover and reactivate API for durable XTS participants. this is subclassed by both a 1.0 and a 1.1 specific class because the activate operation needs to create a participant engine appropriate to the protocol in use when the participant was saved.
  • Field Details

  • Constructor Details

  • Method Details

    • saveState

      public final boolean saveState(OutputObjectState oos)
      Retrieve and save the state of the particpant to the specified input object stream.
      Specified by:
      saveState in interface PersistableParticipant
      Parameters:
      oos - The output output stream.
      Returns:
      true if persisted, false otherwise.
    • restoreState

      public boolean restoreState(InputObjectState ios)
      Restore the state of the particpant from the specified input object stream.
      Specified by:
      restoreState in interface PersistableParticipant
      Parameters:
      ios - The Input object stream.
      Returns:
      true if restored, false otherwise.
    • restoreParticipant

      public boolean restoreParticipant(XTSBARecoveryModule module) throws Exception
      called during recovery processing to attempt to convert the restored application- specific recovery state back into a participant
      Parameters:
      module - the XTS recovery module to be used to attempt the conversion
      Returns:
      whether the participant could be restored
      Throws:
      Exception
    • getId

      public String getId()
    • type

      public static String type()
      Returns:
      the path string under which BA participant records are to be located in the TX object store
    • saveEndpointReference

      protected abstract void saveEndpointReference(OutputObjectState oos) throws IOException, XMLStreamException
      save the endpoint reference to the coordinator for this participant
      Throws:
      IOException
      XMLStreamException
    • restoreEndpointReference

      protected abstract void restoreEndpointReference(InputObjectState ios) throws IOException, XMLStreamException
      restore the endpoint reference to the coordinator for this participant
      Throws:
      IOException
      XMLStreamException
    • activate

      public abstract void activate()
      create a participant engine to manage commit or rollback processing for the participant and install it in the active participants table
    • isActive

      public abstract boolean isActive()
      test whether a participant is currently activated with the id of this recovery record.
      Returns:
      true if a participant is currently activated with the id of this recovery record