Annotation Type TransactionalAdvice


  • @Target({ANNOTATION_TYPE,METHOD,TYPE})
    @Retention(RUNTIME)
    @Around
    @Type(TransactionalInterceptor.class)
    @Internal
    public @interface TransactionalAdvice
    Meta annotation that other transactional annotations like Spring's and 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

    Since:
    1.0
    Author:
    graemerocher
      • transactionManager

        @AliasFor(member="value")
        java.lang.String transactionManager
        A qualifier value for the specified transaction.

        May be used to determine the target transaction manager, matching the qualifier value (or the bean name) of a specific SynchronousTransactionManager bean definition.

        Returns:
        The transaction manager
        Since:
        4.2
        See Also:
        value()
        Default:
        ""
      • timeout

        int timeout
        The timeout for this transaction.

        Defaults to the default timeout of the underlying transaction system.

        Returns:
        The timeout
        Default:
        -1
      • readOnly

        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.

        Returns:
        Whether is read-only transaction
        Default:
        false
      • rollbackFor

        java.lang.Class<? extends java.lang.Throwable>[] rollbackFor
        Defines the exceptions that will not result in a rollback.
        Returns:
        The exception types that will not result in a rollback.
        Since:
        3.5.0
        Default:
        {}
      • noRollbackFor

        java.lang.Class<? extends java.lang.Throwable>[] noRollbackFor
        Defines the exceptions that will not result in a rollback.
        Returns:
        The exception types that will not result in a rollback.
        Since:
        3.5.0
        Default:
        {}