Package com.arjuna.wst11.stub
Class BusinessAgreementWithParticipantCompletionStub
java.lang.Object
com.arjuna.wst11.stub.BusinessAgreementWithParticipantCompletionStub
- All Implemented Interfaces:
BusinessAgreementWithParticipantCompletionParticipant
,PersistableParticipant
public class BusinessAgreementWithParticipantCompletionStub
extends Object
implements BusinessAgreementWithParticipantCompletionParticipant, PersistableParticipant
-
Constructor Summary
ConstructorDescriptionconstructor for use during recovery -
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
error()
If the participant enquired as to the status of the transaction it was registered with and an unrecoverable error occurs then this operation will be invoked.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.status()
void
unknown()
If the participant enquires as to the status of the transaction it was registered with and that transaction is no longer available (has rolled back) then this operation will be invoked by the coordination service.
-
Constructor Details
-
BusinessAgreementWithParticipantCompletionStub
public BusinessAgreementWithParticipantCompletionStub(ParticipantCompletionCoordinatorEngine participant) throws Exception - Throws:
Exception
-
BusinessAgreementWithParticipantCompletionStub
public BusinessAgreementWithParticipantCompletionStub()constructor for use during recovery
-
-
Method Details
-
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
- Specified by:
status
in interfaceBusinessAgreementWithParticipantCompletionParticipant
- Returns:
- the status value.
- Throws:
SystemException
-
unknown
Description copied from interface:BusinessAgreementWithParticipantCompletionParticipant
If the participant enquires as to the status of the transaction it was registered with and that transaction is no longer available (has rolled back) then this operation will be invoked by the coordination service. This has been deprecated since the correct action when a GetStatus request fails is either to cancel or compensate the participant or to call error. GetStatus is only dispatched while the participant is completed so cancel will never be appropriate. compensate is called when the participant is unknown to the coordinator (it responds to the GetStatus request with an InvalidState fault). This will only happen if the coordinator crashed after the participant completed but before the client requested a close/cancel. error is called if any other fault response is received. So there is no other circumstance in which it would be appropriate for unknown to be called.- Specified by:
unknown
in interfaceBusinessAgreementWithParticipantCompletionParticipant
- Throws:
SystemException
-
error
Description copied from interface:BusinessAgreementWithParticipantCompletionParticipant
If the participant enquired as to the status of the transaction it was registered with and an unrecoverable error occurs then this operation will be invoked.- Specified by:
error
in interfaceBusinessAgreementWithParticipantCompletionParticipant
- Throws:
SystemException
-
saveState
Description copied from interface:PersistableParticipant
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
Description copied from interface:PersistableParticipant
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.
-