Annotation Interface Transactional


@Documented @Inherited @Retention(RUNTIME) @Target({METHOD,TYPE}) public @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
  • Element Details

    • enabled

      boolean enabled
      Whether a transaction is needed. Disabling transactions for a method optimizes run time performance.
      Default:
      true
    • isolation

      Isolation isolation
      Returns the Isolation setting.
      Default:
      DEFAULT
    • noRollbackFor

      Class<? extends Throwable>[] noRollbackFor
      Returns exception classes that should not cause the transaction to be rolled back.
      Default:
      {}
    • noRollbackForClassName

      String[] noRollbackForClassName
      Returns exception names that should not cause the transaction to be rolled back.
      Default:
      {}
    • propagation

      Propagation propagation
      Returns the Propagation setting.
      Default:
      REQUIRED
    • readOnly

      boolean readOnly
      Whether the the transaction is effectively read-only, allowing for optimizations at run time.
      Default:
      false
    • rollbackFor

      Class<? extends Throwable>[] rollbackFor
      Returns exception classes that cause the transaction to be rolled back.
      Default:
      {}
    • rollbackForClassName

      String[] rollbackForClassName
      Returns exception names that cause the transaction to be rolled back.
      Default:
      {}
    • timeout

      int timeout
      Returns the transaction's timeout in seconds.
      Default:
      -1