@Target(value={ANNOTATION_TYPE,METHOD,TYPE}) @Retention(value=RUNTIME) @Around @Type(value=TransactionalInterceptor.class) @Internal public @interface TransactionalAdvice
javax.transaction.Transactional
map
to such as to enable transactional advice. Shouldn't be used directly.
This annotation is declared with a target of ElementType.ANNOTATION_TYPE
so that is used only as a meta-annotation. In actual code you would use javax.transaction.Transaction
Modifier and Type | Optional Element and Description |
---|---|
TransactionDefinition.Isolation |
isolation
The transaction isolation level.
|
java.lang.Class<? extends java.lang.Throwable>[] |
noRollbackFor
Defines the exceptions that will not result in a rollback.
|
TransactionDefinition.Propagation |
propagation
The transaction propagation type.
|
boolean |
readOnly
true if the transaction is read-only. |
int |
timeout
The timeout for this transaction.
|
java.lang.String |
transactionManager
A qualifier value for the specified transaction.
|
java.lang.String |
value
Alias for
transactionManager() . |
public abstract java.lang.String value
transactionManager()
.transactionManager()
public abstract java.lang.String transactionManager
May be used to determine the target transaction manager,
matching the qualifier value (or the bean name) of a specific
SynchronousTransactionManager
bean definition.
value()
public abstract TransactionDefinition.Propagation propagation
Defaults to TransactionDefinition.Propagation.REQUIRED
.
public abstract TransactionDefinition.Isolation isolation
Defaults to TransactionDefinition.Isolation.DEFAULT
.
public abstract int timeout
Defaults to the default timeout of the underlying transaction system.
public abstract boolean readOnly
true
if the transaction is read-only.
Defaults to false
.
This just serves as a hint for the actual transaction subsystem; it will not necessarily cause failure of write access attempts. A transaction manager which cannot interpret the read-only hint will not throw an exception when asked for a read-only transaction but rather silently ignore the hint.