Class XTSBASubordinateRecoveryModule

java.lang.Object
org.jboss.jbossts.xts.recovery.participant.ba.XTSBASubordinateRecoveryModule
All Implemented Interfaces:
XTSBARecoveryModule

public class XTSBASubordinateRecoveryModule extends Object implements XTSBARecoveryModule
A recovery module which recovers durable participants registered by subordinate coordinators
  • Constructor Details

    • XTSBASubordinateRecoveryModule

      public XTSBASubordinateRecoveryModule()
  • Method Details

    • deserializeParticipantCompletionParticipant

      public BusinessAgreementWithParticipantCompletionParticipant deserializeParticipantCompletionParticipant(String id, ObjectInputStream stream) throws Exception
      Description copied from interface: XTSBARecoveryModule
      called during recovery processing to allow an application to identify a participant id belonging to one of its participants and recreate the participant by deserializing it from the supplied object input stream. n.b. this is only appropriate in case the original was a ParticipantCompletion participant saved using serialization.
      Specified by:
      deserializeParticipantCompletionParticipant in interface XTSBARecoveryModule
      Parameters:
      id - the id used when the participant was created
      stream - a stream from which the application should deserialise the participant if it recognises that the id belongs to the module's application
      Returns:
      the deserialized ParticipantCompletion participant
      Throws:
      Exception - if an error occurs deserializing the ParticipantCompletion participant
    • recreateParticipantCompletionParticipant

      public BusinessAgreementWithParticipantCompletionParticipant recreateParticipantCompletionParticipant(String id, byte[] recoveryState) throws Exception
      Description copied from interface: XTSBARecoveryModule
      called during recovery processing to allow an application to identify a participant id belonging to one of its participants and use the saved recovery state to recreate the participant. n.b. this is only appropriate in case the original was a ParticipantCompletion participant saved after being converted to a byte array using the PersistibleBAParticipant interface.
      Specified by:
      recreateParticipantCompletionParticipant in interface XTSBARecoveryModule
      Parameters:
      id - the id used when the participant was created
      recoveryState - a byte array returned form the original participant via a call to method getRecoveryState of interface PersistableBAParticipant
      Returns:
      the recreated ParticipantCompletion participant
      Throws:
      Exception - if an error occurs converting the recoveryState back to a ParticipantCompletion participant
    • deserializeCoordinatorCompletionParticipant

      public BusinessAgreementWithCoordinatorCompletionParticipant deserializeCoordinatorCompletionParticipant(String id, ObjectInputStream stream) throws Exception
      Description copied from interface: XTSBARecoveryModule
      called during recovery processing to allow an application to identify a participant id belonging to one of its participants and recreate the participant by deserializing it from the supplied object input stream. n.b. this is only appropriate in case the original was a CoordinatorCompletion participant saved using serialization.
      Specified by:
      deserializeCoordinatorCompletionParticipant in interface XTSBARecoveryModule
      Parameters:
      id - the id used when the participant was created
      stream - a stream from which the application should deserialise the participant if it recognises that the id belongs to the module's application
      Returns:
      the deserialized ParticipantCompletion participant
      Throws:
      Exception - if an error occurs deserializing the CoordinatorCompletion participant
    • recreateCoordinatorCompletionParticipant

      public BusinessAgreementWithCoordinatorCompletionParticipant recreateCoordinatorCompletionParticipant(String id, byte[] recoveryState) throws Exception
      Description copied from interface: XTSBARecoveryModule
      called during recovery processing to allow an application to identify a participant id belonging to one of its participants and use the saved recovery state to recreate the participant. n.b. this is only appropriate in case the original was a CoordinatorCompletion participant saved after being converted to a byte array using the PersistibleBAParticipant interface.
      Specified by:
      recreateCoordinatorCompletionParticipant in interface XTSBARecoveryModule
      Parameters:
      id - the id used when the participant was created
      recoveryState - a byte array returned form the original participant via a call to method getRecoveryState of interface PersistableBAParticipant
      Returns:
      the recreated ParticipantCompletion participant
      Throws:
      Exception - if an error occurs converting the recoveryState back to a CoordinatorCompletion participant
    • endScan

      public void endScan()
      we don't need to use this because the BA recovery manager tracks whether a recovery scan has happened
      Specified by:
      endScan in interface XTSBARecoveryModule