Class JtaTransactionAnnotationParser
java.lang.Object
org.springframework.transaction.annotation.JtaTransactionAnnotationParser
- All Implemented Interfaces:
- Serializable, TransactionAnnotationParser
public class JtaTransactionAnnotationParser
extends Object
implements TransactionAnnotationParser, Serializable
Strategy implementation for parsing JTA 1.2's 
Transactional annotation.- Since:
- 4.0
- Author:
- Juergen Hoeller
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleaninthashCode()booleanisCandidateClass(Class<?> targetClass) Determine whether the given class is a candidate for transaction attributes in the annotation format of thisTransactionAnnotationParser.parseTransactionAnnotation(jakarta.transaction.Transactional ann) Parse the transaction attribute for the given method or class, based on an annotation type understood by this parser.protected TransactionAttributeparseTransactionAnnotation(AnnotationAttributes attributes) 
- 
Constructor Details- 
JtaTransactionAnnotationParserpublic JtaTransactionAnnotationParser()
 
- 
- 
Method Details- 
isCandidateClassDescription copied from interface:TransactionAnnotationParserDetermine 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.- Specified by:
- isCandidateClassin interface- TransactionAnnotationParser
- 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.
 
- 
parseTransactionAnnotationDescription copied from interface:TransactionAnnotationParserParse 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.- Specified by:
- parseTransactionAnnotationin interface- TransactionAnnotationParser
- Parameters:
- element- the annotated method or class
- Returns:
- the configured transaction attribute, or nullif none found
- See Also:
 
- 
parseTransactionAnnotation
- 
parseTransactionAnnotation
- 
equals
- 
hashCode
 
-