java.lang.Object | ||
↳ | org.springframework.transaction.interceptor.AbstractFallbackTransactionAttributeSource | |
↳ | org.springframework.transaction.annotation.AnnotationTransactionAttributeSource |
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 EJB3's javax.ejb.TransactionAttribute annotation (if present).
This class may also serve as base class for a custom TransactionAttributeSource,
or get customized through TransactionAnnotationParser
strategies.
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.transaction.interceptor.AbstractFallbackTransactionAttributeSource
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create a default AnnotationTransactionAttributeSource, supporting
public methods that carry the
Transactional annotation
or the EJB3 javax.ejb.TransactionAttribute annotation. | |||||||||||
Create a custom AnnotationTransactionAttributeSource, supporting
public methods that carry the
Transactional annotation
or the EJB3 javax.ejb.TransactionAttribute annotation. | |||||||||||
Create a custom AnnotationTransactionAttributeSource.
| |||||||||||
Create a custom AnnotationTransactionAttributeSource.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
By default, only public methods can be made transactional.
| |||||||||||
Determine the transaction attribute for the given method or class.
| |||||||||||
Subclasses need to implement this to return the transaction attribute
for the given method, if any.
| |||||||||||
Subclasses need to implement this to return the transaction attribute
for the given class, if any.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.transaction.interceptor.AbstractFallbackTransactionAttributeSource
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
org.springframework.transaction.interceptor.TransactionAttributeSource
|
Create a default AnnotationTransactionAttributeSource, supporting
public methods that carry the Transactional
annotation
or the EJB3 javax.ejb.TransactionAttribute annotation.
Create a custom AnnotationTransactionAttributeSource, supporting
public methods that carry the Transactional
annotation
or the EJB3 javax.ejb.TransactionAttribute annotation.
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)
|
---|
Create a custom AnnotationTransactionAttributeSource.
annotationParser | the TransactionAnnotationParser to use |
---|
Create a custom AnnotationTransactionAttributeSource.
annotationParsers | the TransactionAnnotationParsers to use |
---|
By default, only public methods can be made transactional.
Determine the transaction attribute for the given method or class.
This implementation delegates to configured
TransactionAnnotationParsers
for parsing known annotations into Spring's metadata attribute class.
Returns null
if it's not transactional.
Can be overridden to support custom annotations that carry transaction metadata.
ae | the annotated method or class |
---|
null
if none was found
Subclasses need to implement this to return the transaction attribute for the given method, if any.
method | the method to retrieve the attribute for |
---|
null
if none)
Subclasses need to implement this to return the transaction attribute for the given class, if any.
clazz | the class to retrieve the attribute for |
---|
null
if none)