com.arjuna.wst11.stub
Class SubordinateDurable2PCStub

java.lang.Object
  extended by com.arjuna.wst11.stub.SubordinateDurable2PCStub
All Implemented Interfaces:
Durable2PCParticipant, Participant, PersistableParticipant, org.jboss.jbossts.xts.recovery.participant.at.PersistableATParticipant

public class SubordinateDurable2PCStub
extends Object
implements Durable2PCParticipant, PersistableParticipant, org.jboss.jbossts.xts.recovery.participant.at.PersistableATParticipant

A durable participant registered on behalf of an interposed WS-AT coordinator in order to ensure that durable participants in the subtransaction prepared, committed and aborted at the right time.


Constructor Summary
SubordinateDurable2PCStub()
          empty constructor for use only during recovery
SubordinateDurable2PCStub(com.arjuna.mwlabs.wscf.model.twophase.arjunacore.subordinate.SubordinateATCoordinator coordinator)
          normal constructor used when the subordinate coordinator is registered as a durable participant with its parent coordinator.
 
Method Summary
 void commit()
          this will be called when the parent coordinator commits its durable participants and should ensure that the interposed cooordinator does the same
 void error()
          this should never get called
 byte[] getRecoveryState()
          this participant implements the PersistableATarticipant interface so it can save its state.
 boolean isRecovered()
          test if this participant is recovered
 Vote prepare()
          This will be called when the parent coordinator is preparing its durable participants and should ensure that the interposed cooordinator does the same.
 boolean restoreState(com.arjuna.ats.arjuna.state.InputObjectState ios)
          Restore the state of the particpant from the specified input object stream.
 void rollback()
          this will be called when the parent coordinator rolls back its durable participants and should ensure that the interposed cooordinator does the same
 boolean saveState(com.arjuna.ats.arjuna.state.OutputObjectState oos)
          Save the state of the particpant to the specified input object stream.
 void unknown()
          this should never get called
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubordinateDurable2PCStub

public SubordinateDurable2PCStub(com.arjuna.mwlabs.wscf.model.twophase.arjunacore.subordinate.SubordinateATCoordinator coordinator)
normal constructor used when the subordinate coordinator is registered as a durable participant with its parent coordinator.

Parameters:
coordinator -

SubordinateDurable2PCStub

public SubordinateDurable2PCStub()
empty constructor for use only during recovery

Method Detail

prepare

public Vote prepare()
             throws WrongStateException,
                    SystemException
This will be called when the parent coordinator is preparing its durable participants and should ensure that the interposed cooordinator does the same.

Specified by:
prepare in interface Participant
Returns:
the Vote returned by the subordinate coordinator.
Throws:
WrongStateException - if the subordinate coordinator does the same
SystemException - if the subordinate coordinator does the same
See Also:
Vote

commit

public void commit()
            throws WrongStateException,
                   SystemException
this will be called when the parent coordinator commits its durable participants and should ensure that the interposed cooordinator does the same

Specified by:
commit in interface Participant
Throws:
WrongStateException
SystemException

rollback

public void rollback()
              throws WrongStateException,
                     SystemException
this will be called when the parent coordinator rolls back its durable participants and should ensure that the interposed cooordinator does the same

Specified by:
rollback in interface Participant
Throws:
WrongStateException
SystemException

unknown

public void unknown()
             throws SystemException
this should never get called

Specified by:
unknown in interface Participant
Throws:
SystemException

error

public void error()
           throws SystemException
this should never get called

Specified by:
error in interface Participant
Throws:
SystemException

saveState

public boolean saveState(com.arjuna.ats.arjuna.state.OutputObjectState oos)
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(com.arjuna.ats.arjuna.state.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.

isRecovered

public boolean isRecovered()
test if this participant is recovered


getRecoveryState

public byte[] getRecoveryState()
                        throws Exception
this participant implements the PersistableATarticipant interface so it can save its state. recovery is managed by an XTS recovery module

Specified by:
getRecoveryState in interface org.jboss.jbossts.xts.recovery.participant.at.PersistableATParticipant
Returns:
Throws:
Exception


Copyright © 2012. All Rights Reserved.