com.ibm.websphere.wsba
Interface CompensationHandler
-
public interface CompensationHandlerA CompensationHandler provides compensation logic for the unit of work (UOW) with which the business Activity is associated.
-
-
Method Summary
Methods Modifier and Type Method and Description voidclose(commonj.sdo.DataObject compensationData)Invoked upon successful completion of the Business Activity, if this CompensatorHandler has been added to the business Activity context via theUserBusinessActivityinterface and the CompensationHandler was active on completion of the Business Activity.voidcompensate(commonj.sdo.DataObject compensationData)Invoked upon unsuccessful completion, if this CompensatorHandler has been added to the business Activity context via theUserBusinessActivityinterface and the CompensationHandler was active on completion of the Business Activity.
-
-
-
Method Detail
-
close
void close(commonj.sdo.DataObject compensationData) throws RetryCompensationHandlerException, CompensationHandlerFailedExceptionInvoked upon successful completion of the Business Activity, if this CompensatorHandler has been added to the business Activity context via theUserBusinessActivityinterface and the CompensationHandler was active on completion of the Business Activity. A CompensationHandler implementation must be able to tolerate this method being driven more than once during the completion or recovery of a business activity. An implementation of a CompensationHandler must not make any assumptions about the order in which CompensationHandlers are driven during the completion or recovery of a business activity.- Throws:
RetryCompensationHandlerException- thrown if the participant cannot process its close implementation at that time. The compensator will be retried.CompensationHandlerFailedException- thrown if the participant cannot process its close implementation due to an unrecoverable error.
-
compensate
void compensate(commonj.sdo.DataObject compensationData) throws RetryCompensationHandlerException, CompensationHandlerFailedExceptionInvoked upon unsuccessful completion, if this CompensatorHandler has been added to the business Activity context via theUserBusinessActivityinterface and the CompensationHandler was active on completion of the Business Activity. A CompensationHandler implementation must be able to tolerate this method being driven more than once during the completion or recovery of a business activity. An implementation of a CompensationHandler must not make any assumptions about the order in which CompensationHandlers are driven during the completion or recovery of a business activity.- Throws:
RetryCompensationHandlerException- thrown if the participant cannot process its compensate implementation at that time. The compensator will be retried.CompensationHandlerFailedException- thrown if the participant cannot process its compensate implementation due to an unrecoverable error.
-
-