Package com.arjuna.wst11.stub
Class SubordinateCoordinatorCompletionParticipantStub
java.lang.Object
com.arjuna.wst11.stub.SubordinateCoordinatorCompletionParticipantStub
- All Implemented Interfaces:
BusinessAgreementWithCoordinatorCompletionParticipant
,BusinessAgreementWithParticipantCompletionParticipant
,PersistableParticipant
,PersistableBAParticipant
public class SubordinateCoordinatorCompletionParticipantStub
extends Object
implements BusinessAgreementWithCoordinatorCompletionParticipant, PersistableParticipant, 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
ConstructorDescriptionSubordinateCoordinatorCompletionParticipantStub
(com.arjuna.mwlabs.wscf.model.sagas.arjunacore.subordinate.SubordinateBACoordinator coordinator) -
Method Summary
Modifier and TypeMethodDescriptionvoid
cancel()
The transaction has cancelled, and the participant should undo any work.void
close()
The transaction has completed successfully.void
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 calledbyte[]
boolean
Restore the state of the particpant from the specified input object stream.boolean
Save the state of the particpant to the specified input object stream.void
setManager
(BAParticipantManager manager) set the participant manager for this stub.status()
this should never get calledvoid
unknown()
this should never get called
-
Constructor Details
-
SubordinateCoordinatorCompletionParticipantStub
public SubordinateCoordinatorCompletionParticipantStub(com.arjuna.mwlabs.wscf.model.sagas.arjunacore.subordinate.SubordinateBACoordinator coordinator) -
SubordinateCoordinatorCompletionParticipantStub
public SubordinateCoordinatorCompletionParticipantStub()
-
-
Method Details
-
setManager
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
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 interfaceBusinessAgreementWithCoordinatorCompletionParticipant
- Throws:
WrongStateException
SystemException
-
close
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 interfaceBusinessAgreementWithParticipantCompletionParticipant
- Throws:
WrongStateException
SystemException
-
cancel
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 interfaceBusinessAgreementWithParticipantCompletionParticipant
- Throws:
FaultedException
WrongStateException
SystemException
-
compensate
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 interfaceBusinessAgreementWithParticipantCompletionParticipant
- 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
this should never get called- Specified by:
status
in interfaceBusinessAgreementWithParticipantCompletionParticipant
- Returns:
- the status value.
- Throws:
SystemException
-
unknown
this should never get called- Specified by:
unknown
in interfaceBusinessAgreementWithParticipantCompletionParticipant
- Throws:
SystemException
-
error
this should never get called- Specified by:
error
in interfaceBusinessAgreementWithParticipantCompletionParticipant
- Throws:
SystemException
-
saveState
Save the state of the particpant to the specified input object stream.- Specified by:
saveState
in interfacePersistableParticipant
- Parameters:
oos
- The output output stream.- Returns:
- true if persisted, false otherwise.
-
restoreState
Restore the state of the particpant from the specified input object stream.- Specified by:
restoreState
in interfacePersistableParticipant
- Parameters:
ios
- The Input object stream.- Returns:
- true if restored, false otherwise.
-
getRecoveryState
- Specified by:
getRecoveryState
in interfacePersistableBAParticipant
- Throws:
Exception
-