Polishing around @EnableTransactionManagement
Issue: SPR-10864
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2013 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -145,7 +145,6 @@ public @interface EnableTransactionManagement {
|
||||
* opposed to standard Java interface-based proxies ({@code false}). The default is
|
||||
* {@code false}. <strong>Applicable only if {@link #mode()} is set to
|
||||
* {@link AdviceMode#PROXY}</strong>.
|
||||
*
|
||||
* <p>Note that setting this attribute to {@code true} will affect <em>all</em>
|
||||
* Spring-managed beans requiring proxying, not just those marked with
|
||||
* {@code @Transactional}. For example, other beans marked with Spring's
|
||||
@@ -168,4 +167,5 @@ public @interface EnableTransactionManagement {
|
||||
* The default is {@link Ordered#LOWEST_PRECEDENCE}.
|
||||
*/
|
||||
int order() default Ordered.LOWEST_PRECEDENCE;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2013 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -40,8 +40,7 @@ public class ProxyTransactionManagementConfiguration extends AbstractTransaction
|
||||
@Bean(name=TransactionManagementConfigUtils.TRANSACTION_ADVISOR_BEAN_NAME)
|
||||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
|
||||
public BeanFactoryTransactionAttributeSourceAdvisor transactionAdvisor() {
|
||||
BeanFactoryTransactionAttributeSourceAdvisor advisor =
|
||||
new BeanFactoryTransactionAttributeSourceAdvisor();
|
||||
BeanFactoryTransactionAttributeSourceAdvisor advisor = new BeanFactoryTransactionAttributeSourceAdvisor();
|
||||
advisor.setTransactionAttributeSource(transactionAttributeSource());
|
||||
advisor.setAdvice(transactionInterceptor());
|
||||
advisor.setOrder(this.enableTx.<Integer>getNumber("order"));
|
||||
|
||||
@@ -32,8 +32,7 @@ import org.springframework.transaction.config.TransactionManagementConfigUtils;
|
||||
* @see ProxyTransactionManagementConfiguration
|
||||
* @see TransactionManagementConfigUtils#TRANSACTION_ASPECT_CONFIGURATION_CLASS_NAME
|
||||
*/
|
||||
public class TransactionManagementConfigurationSelector
|
||||
extends AdviceModeImportSelector<EnableTransactionManagement> {
|
||||
public class TransactionManagementConfigurationSelector extends AdviceModeImportSelector<EnableTransactionManagement> {
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
|
||||
Reference in New Issue
Block a user