org.springframework.transaction.interceptor.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 jakarta. and EJB3's
jakarta. annotation (if present).
This class may also serve as base class for a custom TransactionAttributeSource,
or get customized through TransactionAnnotationParser strategies.
Transactional, TransactionAnnotationParser, SpringTransactionAnnotationParser, Ejb3TransactionAnnotationParser, org.springframework.transaction.interceptor.TransactionInterceptor#setTransactionAttributeSource , org.springframework.transaction.interceptor.TransactionProxyFactoryBean#setTransactionAttributeSource
| Modifier and Type | Field and Description |
|---|---|
| private final Set | |
| private static final boolean | |
| private static final boolean | |
| private final boolean |
| Access | Constructor and Description |
|---|---|
| public | AnnotationTransactionAttributeSource()
Create a default AnnotationTransactionAttributeSource, supporting
public methods that carry the |
| public | AnnotationTransactionAttributeSource(boolean
whether to support public methods that carry
the publicMethodsOnly)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, supporting
public methods that carry the |
| public | AnnotationTransactionAttributeSource(TransactionAnnotationParser
the TransactionAnnotationParser to use annotationParser)Create a custom AnnotationTransactionAttributeSource. |
| public | AnnotationTransactionAttributeSource(TransactionAnnotationParser...
the TransactionAnnotationParsers to use annotationParsers)Create a custom AnnotationTransactionAttributeSource. |
| public | AnnotationTransactionAttributeSource(Set<TransactionAnnotationParser>
the TransactionAnnotationParsers to use annotationParsers)Create a custom AnnotationTransactionAttributeSource. |
| Modifier and Type | Method and Description |
|---|---|
| protected boolean | allowPublicMethodsOnly()
By default, only public methods can be made transactional.
|
| protected TransactionAttribute | Returns: the configured transaction attribute, ornull if none was foundthe annotated method or class element)Determine the transaction attribute for the given method or class. |
| public boolean | equals(Object
the reference object with which to compare. other)Overrides java. |
| protected TransactionAttribute | findTransactionAttribute(Class<?>
the class to retrieve the attribute for clazz)Implements abstract org. |
| protected TransactionAttribute | findTransactionAttribute(Method
the method to retrieve the attribute for method)Implements abstract org. |
| public int | |
| public boolean | isCandidateClass(Class<?>
the class to introspect targetClass)Overrides default org. TransactionAttributeSource.
|
| annotationParsers | back to summary |
|---|---|
| private final Set<TransactionAnnotationParser> annotationParsers | |
| ejb3Present | back to summary |
|---|---|
| private static final boolean ejb3Present | |
| jta12Present | back to summary |
|---|---|
| private static final boolean jta12Present | |
| publicMethodsOnly | back to summary |
|---|---|
| private final boolean publicMethodsOnly | |
| AnnotationTransactionAttributeSource | back to summary |
|---|---|
| public AnnotationTransactionAttributeSource() Create a default AnnotationTransactionAttributeSource, supporting
public methods that carry the | |
| AnnotationTransactionAttributeSource | back to summary |
|---|---|
| public AnnotationTransactionAttributeSource(boolean publicMethodsOnly) Create a custom AnnotationTransactionAttributeSource, supporting
public methods that carry the
| |
| AnnotationTransactionAttributeSource | back to summary |
|---|---|
| public AnnotationTransactionAttributeSource(TransactionAnnotationParser annotationParser) Create a custom AnnotationTransactionAttributeSource.
| |
| AnnotationTransactionAttributeSource | back to summary |
|---|---|
| public AnnotationTransactionAttributeSource(TransactionAnnotationParser... annotationParsers) Create a custom AnnotationTransactionAttributeSource.
| |
| AnnotationTransactionAttributeSource | back to summary |
|---|---|
| public AnnotationTransactionAttributeSource(Set<TransactionAnnotationParser> annotationParsers) Create a custom AnnotationTransactionAttributeSource.
| |
| allowPublicMethodsOnly | back to summary |
|---|---|
| protected boolean allowPublicMethodsOnly() By default, only public methods can be made transactional.
| |
| determineTransactionAttribute | back to summary |
|---|---|
| protected TransactionAttribute determineTransactionAttribute(AnnotatedElement element) Determine the transaction attribute for the given method or class. This implementation delegates to configured
Can be overridden to support custom annotations that carry transaction metadata.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object other) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| findTransactionAttribute | back to summary |
|---|---|
| protected TransactionAttribute findTransactionAttribute(Class<?> clazz) Implements abstract org. Subclasses need to implement this to return the transaction attribute for the given class, if any.
| |
| findTransactionAttribute | back to summary |
|---|---|
| protected TransactionAttribute findTransactionAttribute(Method method) Implements abstract org. Subclasses need to implement this to return the transaction attribute for the given method, if any.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isCandidateClass | back to summary |
|---|---|
| public boolean isCandidateClass(Class<?> targetClass) Overrides default org. Doc from org. Determine whether the given class is a candidate for transaction attributes
in the metadata format of this If this method returns | |