@InterceptorBinding @Retention(value=RUNTIME) @Target(value={TYPE,METHOD}) public @interface Compensatable
The org.jboss.narayana.compensations.api.Compensatable annotation provides the application the ability to declaratively control compensation transaction boundaries on CDI managed beans, as well as classes defined as managed beans by the Java EE specification, at both the class and method level where method level annotations override those at the class level.
This support is provided via an implementation of CDI interceptors that conduct the necessary suspending, resuming, etc. The Compensatable interceptor interposes on business method invocations only and not on lifecycle events. Lifecycle methods are invoked in an unspecified transaction context.
The TxType element of the annotation indicates whether a bean method is to be executed within a transaction context. TxType.REQUIRED is the default.
By default checked exceptions do not result in the transactional interceptor marking the transaction for rollback and instances of RuntimeException and its subclasses do. This default behavior can be modified by specifying exceptions that result in the interceptor marking the transaction for rollback and/or exceptions that do not result in rollback.
Modifier and Type | Optional Element and Description |
---|---|
CompensationTransactionType |
value |
public abstract CompensationTransactionType value
Copyright © 2013. All rights reserved.