Class InboundBridgeRecoveryManager
java.lang.Object
org.jboss.jbossts.txbridge.inbound.InboundBridgeRecoveryManager
- All Implemented Interfaces:
RecoveryModule
,XAResourceOrphanFilter
,XTSATRecoveryModule
public class InboundBridgeRecoveryManager
extends Object
implements XTSATRecoveryModule, RecoveryModule, XAResourceOrphanFilter
Integrates with JBossAS MC lifecycle and JBossTS recovery manager to provide
recovery services for inbound bridged transactions.
- Author:
- jonathan.halliday@redhat.com, 2009-02-10
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.arjuna.ats.jta.recovery.XAResourceOrphanFilter
XAResourceOrphanFilter.Vote
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionUsed to identify inbound bridged Xids in either the RM log (when called by XARecoveryModule) or the JCA subordinate tx log (when called internally from this class) which have or have not got a remaining transaction that may still drive them to completion.deserialize
(String id, ObjectInputStream objectInputStream) 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.void
endScan()
participant recovery modules may need to perform special processing when the a recovery scan has completed.void
Called by the RecoveryManager at start up, and then PERIODIC_RECOVERY_PERIOD seconds after the completion, for all RecoveryModules, of the second passvoid
Called by the RecoveryManager RECOVERY_BACKOFF_PERIOD seconds after the completion of the first passUnused recovery callback.void
start()
MC lifecycle callback, used to register components with the recovery manager.void
stop()
MC lifecycle callback, used to unregister components from the recovery manager.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.arjuna.ats.arjuna.recovery.RecoveryModule
hasWorkLeftToDo
-
Constructor Details
-
InboundBridgeRecoveryManager
public InboundBridgeRecoveryManager()
-
-
Method Details
-
start
public void start()MC lifecycle callback, used to register components with the recovery manager. -
stop
public void stop()MC lifecycle callback, used to unregister components from the recovery manager. -
deserialize
public Durable2PCParticipant deserialize(String id, ObjectInputStream objectInputStream) throws Exception 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 participant was originally saved using serialization.- Specified by:
deserialize
in interfaceXTSATRecoveryModule
- Parameters:
id
- the id used when the participant was createdobjectInputStream
- a stream from which the application should deserialize the participant if it recognises that the id belongs to the module's application- Returns:
- the deserialized Participant object
- Throws:
Exception
- if an error occurs deserializing the durable participant
-
endScan
public void endScan()participant recovery modules may need to perform special processing when the a recovery scan has completed. in particular it is only after the first recovery scan has completed they can identify whether locally prepared changes are accompanied by a recreated participant and roll back changes for those with no such participant.- Specified by:
endScan
in interfaceXTSATRecoveryModule
-
recreate
Unused recovery callback. We use serialization instead, so this method will always throw an exception if called.- Specified by:
recreate
in interfaceXTSATRecoveryModule
- Parameters:
s
- the id used when the participant was createdbytes
- a byte array returned form the original participant via a call to method getRecoveryState of interface PersistableATParticipant- Returns:
- the recreated Durable2PCParticipant
- Throws:
Exception
- if an error occurs converting the recoveryState back to a durable participant
-
periodicWorkFirstPass
public void periodicWorkFirstPass()Called by the RecoveryManager at start up, and then PERIODIC_RECOVERY_PERIOD seconds after the completion, for all RecoveryModules, of the second pass- Specified by:
periodicWorkFirstPass
in interfaceRecoveryModule
-
periodicWorkSecondPass
public void periodicWorkSecondPass()Called by the RecoveryManager RECOVERY_BACKOFF_PERIOD seconds after the completion of the first pass- Specified by:
periodicWorkSecondPass
in interfaceRecoveryModule
-
checkXid
Used to identify inbound bridged Xids in either the RM log (when called by XARecoveryModule) or the JCA subordinate tx log (when called internally from this class) which have or have not got a remaining transaction that may still drive them to completion.- Specified by:
checkXid
in interfaceXAResourceOrphanFilter
- Parameters:
xid
- The in-doubt xid.- Returns:
- a Vote on the handling of the xid (to roll it back or not).
-