Annotation Interface Transactional
Configures the transaction advice for methods that have this annotation when
they're invoked by an
com.liferay.portal.spring.aop.AopInvocationHandler
.
- All Liferay aspect annotations are aware of their scope.
- Interface aspect annotations can be overwritten by their implementations.
- Class level aspect annotations can be overwritten by method annotations.
- Author:
- Brian Wing Shun Chan
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionboolean
Whether a transaction is needed.Returns theIsolation
setting.Returns exception classes that should not cause the transaction to be rolled back.String[]
Returns exception names that should not cause the transaction to be rolled back.Returns thePropagation
setting.boolean
Whether the the transaction is effectively read-only, allowing for optimizations at run time.Returns exception classes that cause the transaction to be rolled back.String[]
Returns exception names that cause the transaction to be rolled back.int
Returns the transaction's timeout in seconds.
-
Element Details
-
enabled
boolean enabledWhether a transaction is needed. Disabling transactions for a method optimizes run time performance.- Default:
- true
-
isolation
Isolation isolationReturns theIsolation
setting.- Default:
- DEFAULT
-
noRollbackFor
Returns exception classes that should not cause the transaction to be rolled back.- Default:
- {}
-
noRollbackForClassName
String[] noRollbackForClassNameReturns exception names that should not cause the transaction to be rolled back.- Default:
- {}
-
propagation
Propagation propagationReturns thePropagation
setting.- Default:
- REQUIRED
-
readOnly
boolean readOnlyWhether the the transaction is effectively read-only, allowing for optimizations at run time.- Default:
- false
-
rollbackFor
Returns exception classes that cause the transaction to be rolled back.- Default:
- {}
-
rollbackForClassName
String[] rollbackForClassNameReturns exception names that cause the transaction to be rolled back.- Default:
- {}
-
timeout
int timeoutReturns the transaction's timeout in seconds.- Default:
- -1
-