Interface TransactionAnnotationParser
- All Known Implementing Classes:
- Ejb3TransactionAnnotationParser,- JtaTransactionAnnotationParser,- SpringTransactionAnnotationParser
public interface TransactionAnnotationParser
Strategy interface for parsing known transaction annotation types.
 
AnnotationTransactionAttributeSource delegates to such
 parsers for supporting specific annotation types such as Spring's own
 Transactional, JTA 1.2's Transactional
 or EJB3's TransactionAttribute.- Since:
- 2.5
- Author:
- Juergen Hoeller
- See Also:
- 
Method SummaryModifier and TypeMethodDescriptiondefault booleanisCandidateClass(Class<?> targetClass) Determine whether the given class is a candidate for transaction attributes in the annotation format of thisTransactionAnnotationParser.Parse the transaction attribute for the given method or class, based on an annotation type understood by this parser.
- 
Method Details- 
isCandidateClassDetermine whether the given class is a candidate for transaction attributes in the annotation format of thisTransactionAnnotationParser.If this method returns false, the methods on the given class will not get traversed for#parseTransactionAnnotationintrospection. Returningfalseis therefore an optimization for non-affected classes, whereastruesimply means that the class needs to get fully introspected for each method on the given class individually.- Parameters:
- targetClass- the class to introspect
- Returns:
- falseif the class is known to have no transaction annotations at class or method level;- trueotherwise. The default implementation returns- true, leading to regular introspection.
- Since:
- 5.2
 
- 
parseTransactionAnnotationParse the transaction attribute for the given method or class, based on an annotation type understood by this parser.This essentially parses a known transaction annotation into Spring's metadata attribute class. Returns nullif the method/class is not transactional.The returned attribute will typically (but not necessarily) be of type RuleBasedTransactionAttribute.- Parameters:
- element- the annotated method or class
- Returns:
- the configured transaction attribute, or nullif none found
- See Also:
 
 
-