Annotation Type Transactional

    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      Class<? extends Exception>[] noRollbackFor
      A list of exceptions to not rollback on.
      Propagation[] propagation
      Specify the transaction propagation type needed for the marked element.
      boolean[] readOnly
      Define the transaction as having a read-only behavior.
      Class<? extends Exception>[] rollbackOn
      A list of exceptions to rollback on, if thrown by the transactional method.
      boolean[] rollbackOnParticipationFailure
      Define if a failure by a participating transaction should mark the surrounding transaction as rollback only.
    • Element Detail

      • propagation

        Propagation[] propagation
        Specify the transaction propagation type needed for the marked element.
        Returns:
        the propagation type.
        Default:
        {}
      • readOnly

        boolean[] readOnly
        Define the transaction as having a read-only behavior. It is used as an hint to the transaction manager to optimize its behavior. Note that it is not required for the transaction manager to enforce strict read-only behavior.
        Returns:
        true if read-only false otherwise.
        Default:
        {}
      • rollbackOnParticipationFailure

        boolean[] rollbackOnParticipationFailure
        Define if a failure by a participating transaction should mark the surrounding transaction as rollback only.
        Returns:
        true if a failure as participation marks the whole transaction as rollback only, false otherwise.
        Default:
        {}
      • rollbackOn

        Class<? extends Exception>[] rollbackOn
        A list of exceptions to rollback on, if thrown by the transactional method. These exceptions are propagated correctly after a rollback.
        Returns:
        the list of exception classes to rollback on.
        Default:
        {java.lang.Exception.class}
      • noRollbackFor

        Class<? extends Exception>[] noRollbackFor
        A list of exceptions to not rollback on. A caveat to the rollbackOn clause. The disjunction of rollbackOn and noRollbackFor represents the list of exceptions that will trigger a rollback. The complement of rollbackOn and the universal set plus any exceptions in the ignore set represents the list of exceptions that will trigger a commit. Note that ignore exceptions take precedence over rollbackOn, but with subtype granularity.
        Returns:
        the list of exception classes to NOT rollback for.
        Default:
        {}