|
IBM WebSphere Application ServerTM Release 7 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CompensationHandler
A CompensationHandler provides compensation logic for the unit of work (UOW) with which the Business Activity is associated. It uses Serializable objects for its compensation data.
If the CompensationHandler
interface is also implemented
and the compensationData implements the DataObject
interface, then
the methods of the CompensationHandler
interface will
be called in preference to the methods on this interface.
Method Summary | |
---|---|
void |
close(java.io.Serializable compensationData)
Invoked upon successful completion of the Business Activity, if this CompensationHandler has been added to the business Activity context via the UserBusinessActivity interface and the CompensationHandler
was active on completion of the Business Activity. |
void |
compensate(java.io.Serializable compensationData)
Invoked upon unsuccessful completion, if this CompensationHandler has been added to the Business Activity context via the UserBusinessActivity
interface and the CompensationHandler was active on completion of the
Business Activity. |
Method Detail |
---|
void close(java.io.Serializable compensationData) throws RetryCompensationHandlerException, CompensationHandlerFailedException
UserBusinessActivity
interface 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.
RetryCompensationHandlerException
- thrown if the participant cannot process its close
implementation at that time. The compensation handler will be retried.
CompensationHandlerFailedException
- thrown if the participant cannot process its close
implementation due to an unrecoverable error.void compensate(java.io.Serializable compensationData) throws RetryCompensationHandlerException, CompensationHandlerFailedException
UserBusinessActivity
interface 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.
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.
|
IBM WebSphere Application ServerTM Release 7 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |