Class AnnotationTransactionAttributeSource

java.lang.Object
org.springframework.transaction.interceptor.AbstractFallbackTransactionAttributeSource
org.springframework.transaction.annotation.AnnotationTransactionAttributeSource
All Implemented Interfaces:
Serializable, Aware, EmbeddedValueResolverAware, TransactionAttributeSource

public class AnnotationTransactionAttributeSource extends AbstractFallbackTransactionAttributeSource implements Serializable
Implementation of the TransactionAttributeSource interface for working with transaction metadata in JDK 1.5+ annotation format.

This class reads Spring's JDK 1.5+ Transactional annotation and exposes corresponding transaction attributes to Spring's transaction infrastructure. Also supports JTA 1.2's Transactional and EJB3's TransactionAttribute annotation (if present). This class may also serve as base class for a custom TransactionAttributeSource, or get customized through TransactionAnnotationParser strategies.

Since:
1.2
Author:
Colin Sampaleanu, Juergen Hoeller
See Also:
  • Constructor Details

    • AnnotationTransactionAttributeSource

      public AnnotationTransactionAttributeSource()
      Create a default AnnotationTransactionAttributeSource, supporting public methods that carry the Transactional annotation or the EJB3 TransactionAttribute annotation.
    • AnnotationTransactionAttributeSource

      public AnnotationTransactionAttributeSource(boolean publicMethodsOnly)
      Create a custom AnnotationTransactionAttributeSource, supporting public methods that carry the Transactional annotation or the EJB3 TransactionAttribute annotation.
      Parameters:
      publicMethodsOnly - whether to support public methods that carry the Transactional annotation only (typically for use with proxy-based AOP), or protected/private methods as well (typically used with AspectJ class weaving)
    • AnnotationTransactionAttributeSource

      public AnnotationTransactionAttributeSource(TransactionAnnotationParser annotationParser)
      Create a custom AnnotationTransactionAttributeSource.
      Parameters:
      annotationParser - the TransactionAnnotationParser to use
    • AnnotationTransactionAttributeSource

      public AnnotationTransactionAttributeSource(TransactionAnnotationParser... annotationParsers)
      Create a custom AnnotationTransactionAttributeSource.
      Parameters:
      annotationParsers - the TransactionAnnotationParsers to use
    • AnnotationTransactionAttributeSource

      public AnnotationTransactionAttributeSource(Set<TransactionAnnotationParser> annotationParsers)
      Create a custom AnnotationTransactionAttributeSource.
      Parameters:
      annotationParsers - the TransactionAnnotationParsers to use
  • Method Details