Class DelegatingTransactionAttribute

All Implemented Interfaces:
Serializable, TransactionAttribute, TransactionDefinition

public abstract class DelegatingTransactionAttribute extends DelegatingTransactionDefinition implements TransactionAttribute, Serializable
TransactionAttribute implementation that delegates all calls to a given target TransactionAttribute instance. Abstract because it is meant to be subclassed, with subclasses overriding specific methods that are not supposed to simply delegate to the target instance.
Juergen Hoeller, Mark Paluch
See Also:
  • Constructor Details

    • DelegatingTransactionAttribute

      public DelegatingTransactionAttribute(TransactionAttribute targetAttribute)
      Create a DelegatingTransactionAttribute for the given target attribute.
      targetAttribute - the target TransactionAttribute to delegate to
  • Method Details

    • getQualifier

      @Nullable public String getQualifier()
      Description copied from interface: TransactionAttribute
      Return a qualifier value associated with this transaction attribute.

      This may be used for choosing a corresponding transaction manager to process this specific transaction.

      Specified by:
      getQualifier in interface TransactionAttribute
    • getLabels

      public Collection<String> getLabels()
      Description copied from interface: TransactionAttribute
      Return labels associated with this transaction attribute.

      This may be used for applying specific transactional behavior or follow a purely descriptive nature.

      Specified by:
      getLabels in interface TransactionAttribute
    • rollbackOn

      public boolean rollbackOn(Throwable ex)
      Description copied from interface: TransactionAttribute
      Should we roll back on the given exception?
      Specified by:
      rollbackOn in interface TransactionAttribute
      ex - the exception to evaluate
      whether to perform a rollback or not