com.arjuna.wst11.stub
Class SubordinateCoordinatorCompletionParticipantStub

java.lang.Object
  extended by com.arjuna.wst11.stub.SubordinateCoordinatorCompletionParticipantStub
All Implemented Interfaces:
BusinessAgreementWithCoordinatorCompletionParticipant, BusinessAgreementWithParticipantCompletionParticipant, PersistableParticipant, org.jboss.jbossts.xts.recovery.participant.ba.PersistableBAParticipant

public class SubordinateCoordinatorCompletionParticipantStub
extends Object
implements BusinessAgreementWithCoordinatorCompletionParticipant, PersistableParticipant, org.jboss.jbossts.xts.recovery.participant.ba.PersistableBAParticipant

A coordinator completion participant registered on behalf of an interposed WS-BA coordinator in order to ensure that durable participants in the interposed transaction are completed, closed or cancelled when requested from the parent transaction.


Constructor Summary
SubordinateCoordinatorCompletionParticipantStub()
           
SubordinateCoordinatorCompletionParticipantStub(com.arjuna.mwlabs.wscf.model.sagas.arjunacore.subordinate.SubordinateBACoordinator coordinator)
           
 
Method Summary
 void cancel()
          The transaction has cancelled, and the participant should undo any work.
 void close()
          The transaction has completed successfully.
 void compensate()
          The transaction has cancelled.
 void complete()
          The coordinator is informing the participant that all work it needs to do within the scope of this business activity has been received.
 void error()
          this should never get called
 byte[] getRecoveryState()
           
 boolean restoreState(com.arjuna.ats.arjuna.state.InputObjectState ios)
          Restore the state of the particpant from the specified input object stream.
 boolean saveState(com.arjuna.ats.arjuna.state.OutputObjectState oos)
          Save the state of the particpant to the specified input object stream.
 void setManager(BAParticipantManager manager)
          set the participant manager for this stub.
 String status()
          this should never get called
 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

SubordinateCoordinatorCompletionParticipantStub

public SubordinateCoordinatorCompletionParticipantStub(com.arjuna.mwlabs.wscf.model.sagas.arjunacore.subordinate.SubordinateBACoordinator coordinator)

SubordinateCoordinatorCompletionParticipantStub

public SubordinateCoordinatorCompletionParticipantStub()
Method Detail

setManager

public void setManager(BAParticipantManager manager)
set the participant manager for this stub. this cannot be supplied to the constructor because it refers to the engine which drives this participant and the engine can only be created once the participant has been created. it is needed in order to be able to send a fail upward to the parent coordinator during complete processing. it is not needed during close or compensate processing which is ok because we cannot save and restore it anyway.

Parameters:
manager - the manager for this participant

complete

public void complete()
              throws WrongStateException,
                     SystemException
Description copied from interface: BusinessAgreementWithCoordinatorCompletionParticipant
The coordinator is informing the participant that all work it needs to do within the scope of this business activity has been received.

Specified by:
complete in interface BusinessAgreementWithCoordinatorCompletionParticipant
Throws:
WrongStateException
SystemException

close

public void close()
           throws WrongStateException,
                  SystemException
Description copied from interface: BusinessAgreementWithParticipantCompletionParticipant
The transaction has completed successfully. The participant previously informed the coordinator that it was ready to complete.

Specified by:
close in interface BusinessAgreementWithParticipantCompletionParticipant
Throws:
WrongStateException
SystemException

cancel

public void cancel()
            throws FaultedException,
                   WrongStateException,
                   SystemException
Description copied from interface: BusinessAgreementWithParticipantCompletionParticipant
The transaction has cancelled, and the participant should undo any work. The participant cannot have informed the coordinator that it has completed.

Specified by:
cancel in interface BusinessAgreementWithParticipantCompletionParticipant
Throws:
FaultedException
WrongStateException
SystemException

compensate

public void compensate()
                throws FaultedException,
                       WrongStateException,
                       SystemException
Description copied from interface: BusinessAgreementWithParticipantCompletionParticipant
The transaction has cancelled. The participant previously informed the coordinator that it had finished work but could compensate later if required, so it is now requested to do so.

Specified by:
compensate in interface BusinessAgreementWithParticipantCompletionParticipant
Throws:
FaultedException - if the participant was unable to perform the required compensation action because of an unrecoverable error. The coordinator is notified of this fault and as a result will stop resending compensation requests.
SystemException - if the participant was unable to perform the required compensation action because of a transient fault. The coordinator is not notified of this fault so it will retry the compensate request after a suitable timeout.
WrongStateException

status

public String status()
              throws SystemException
this should never get called

Specified by:
status in interface BusinessAgreementWithParticipantCompletionParticipant
Returns:
the status value.
Throws:
SystemException

unknown

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

Specified by:
unknown in interface BusinessAgreementWithParticipantCompletionParticipant
Throws:
SystemException

error

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

Specified by:
error in interface BusinessAgreementWithParticipantCompletionParticipant
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.

getRecoveryState

public byte[] getRecoveryState()
                        throws Exception
Specified by:
getRecoveryState in interface org.jboss.jbossts.xts.recovery.participant.ba.PersistableBAParticipant
Throws:
Exception


Copyright © 2012. All Rights Reserved.