Annotation Type Transactional
-
@Target(METHOD) @Retention(RUNTIME) public @interface Transactional
Indicates methods that are run within a transaction using the given settings. This annotation removes the boilerplate for invokingRetryingTransactionHelper
.Spring AOP limitations
The underlying implementation relies on Spring AOP and thus the transactional advice is subject to the following limitations:
- The annotation can only be applied to public instance methods. The implementation logs a warning if it finds the annotation on a non-public method.
- Client code must invoke
@Transactional
methods on Spring-supplied beans directly. Transactional logic should be factored out to public methods of a separate bean. - Method calls that are internal to the bean will bypass the transactional advice.
- See Also:
RetryingTransactionHelper.doInTransaction(org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback, boolean, boolean)
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description boolean
readOnly
Specifies if the operation should be run within a read-only transaction.boolean
requiresNew
Indicates if the operation requires a new transaction.
-