public class RemoteParticipant extends Object implements BAParticipant, BusinessAgreementWithParticipantCompletionParticipant, ConfirmCompletedParticipant
Constructor and Description |
---|
RemoteParticipant(CompensationHandler compensationHandler,
ConfirmationHandler confirmationHandler,
TransactionLoggedHandler transactionLoggedHandler,
Object currentTX) |
Modifier and Type | Method and Description |
---|---|
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 |
confirmCompleted(boolean confirmed)
a participant callback use to notify the participant either that a recovery record has been written to
the log and hence that uncommitted changes should be committed or that completion was cancelled and
hence that uncommitted changes should be rolled back.
|
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.
|
String |
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.
|
public RemoteParticipant(CompensationHandler compensationHandler, ConfirmationHandler confirmationHandler, TransactionLoggedHandler transactionLoggedHandler, Object currentTX)
public void confirmCompleted(boolean confirmed)
ConfirmCompletedParticipant
confirmCompleted
in interface ConfirmCompletedParticipant
confirmCompleted
in interface BAParticipant
confirmed
- true if the log record has been written and changes should be rolled forward and false
if it has not been written and changes should be rolled backpublic void close() throws WrongStateException, SystemException
BusinessAgreementWithParticipantCompletionParticipant
close
in interface BusinessAgreementWithParticipantCompletionParticipant
close
in interface BAParticipant
WrongStateException
SystemException
public void cancel() throws FaultedException, WrongStateException, SystemException
BusinessAgreementWithParticipantCompletionParticipant
cancel
in interface BusinessAgreementWithParticipantCompletionParticipant
cancel
in interface BAParticipant
FaultedException
WrongStateException
SystemException
public void compensate() throws FaultedException, WrongStateException, SystemException
BusinessAgreementWithParticipantCompletionParticipant
compensate
in interface BusinessAgreementWithParticipantCompletionParticipant
compensate
in interface BAParticipant
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
public String status() throws SystemException
status
in interface BusinessAgreementWithParticipantCompletionParticipant
SystemException
public void unknown() throws SystemException
BusinessAgreementWithParticipantCompletionParticipant
unknown
in interface BusinessAgreementWithParticipantCompletionParticipant
SystemException
public void error() throws SystemException
BusinessAgreementWithParticipantCompletionParticipant
error
in interface BusinessAgreementWithParticipantCompletionParticipant
SystemException
Copyright © 2021 JBoss by Red Hat. All rights reserved.