@InterceptorBinding
@Retention(value=RUNTIME)
@Target(value={TYPE,METHOD})
public @interface TxCompensate
Provides a callback handler for compensating any work done within this annotated method (or all methods of the class
when annotated at the class level). The callback is used later if the compensation-based transaction is cancelled and is
used to undo any work completed by the associated method.
The compensation handler is only registered if the method completes successfully (i.e doesn't throw a RuntimeException, or subclass thereof).
If the method fails, (i.e. throws a RuntimeException or subclass thereof) it is expected that the method leaves the
application in a consistent state as none of the registered handlers will be invoked.
- Author:
- paul.robinson@redhat.com 21/03/2013