open class AnnotationTransactionAttributeSource : AbstractFallbackTransactionAttributeSource, Serializable
Implementation of the 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 javax.transaction.Transactional and 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. |
|
open class Ejb3TransactionAnnotationParser : TransactionAnnotationParser, Serializable
Strategy implementation for parsing EJB3's javax.ejb.TransactionAttribute annotation. |
|
open class JtaTransactionAnnotationParser : TransactionAnnotationParser, Serializable
Strategy implementation for parsing JTA 1.2's javax.transaction.Transactional annotation. |
|
open class ProxyTransactionManagementConfiguration : AbstractTransactionManagementConfiguration
|
|
open class SpringTransactionAnnotationParser : TransactionAnnotationParser, Serializable
Strategy implementation for parsing Spring's Transactional annotation. |
class EnableTransactionManagement
Enables Spring's annotation-driven transaction management capability, similar to the support found in Spring's
For reference, the example above can be compared to the following Spring XML configuration: In both of the scenarios above, @EnableTransactionManagement and <tx:annotation-driven/> are responsible for registering the necessary Spring components that power annotation-driven transaction management, such as the TransactionInterceptor and the proxy- or AspectJ-based advice that weave the interceptor into the call stack when JdbcFooRepository 's @Transactional methods are invoked.
A minor difference between the two examples lies in the naming of the For those that wish to establish a more direct relationship between This approach may be desirable simply because it is more explicit, or it may be necessary in order to distinguish between two PlatformTransactionManager beans present in the same container. As the name suggests, the annotationDrivenTransactionManager() will be the one used for processing @Transactional methods. See TransactionManagementConfigurer Javadoc for further details.
The Note that if the #mode is set to |