Revert "Introduce Ordered#NOT_ORDERED"
This reverts commit da914bcfb4599ebf746ea477c691ed99c4842ed0 and also removes the use of Ordered#NOT_ORDERED from EnableTransactionManagement and ProxyTransactionManagementConfiguration in favor of defaulting to Ordered#LOWEST_PRIORITY, which is actually the default that results when no 'order' attribute is specified in XML.
This commit is contained in:
@@ -52,7 +52,7 @@ public @interface EnableTransactionManagement {
|
||||
/**
|
||||
* Indicate the ordering of the execution of the transaction advisor
|
||||
* when multiple advices are applied at a specific joinpoint.
|
||||
* The default is to not explicitly order the advisor.
|
||||
* The default is lowest priority.
|
||||
*/
|
||||
int order() default Ordered.NOT_ORDERED;
|
||||
int order() default Ordered.LOWEST_PRECEDENCE;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@ import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Role;
|
||||
import org.springframework.core.Ordered;
|
||||
import org.springframework.transaction.config.TransactionManagementConfigUtils;
|
||||
import org.springframework.transaction.interceptor.BeanFactoryTransactionAttributeSourceAdvisor;
|
||||
import org.springframework.transaction.interceptor.TransactionAttributeSource;
|
||||
@@ -38,10 +37,7 @@ public class ProxyTransactionManagementConfiguration extends AbstractTransaction
|
||||
new BeanFactoryTransactionAttributeSourceAdvisor();
|
||||
advisor.setTransactionAttributeSource(transactionAttributeSource());
|
||||
advisor.setAdvice(transactionInterceptor());
|
||||
int order = (Integer)this.enableTx.get("order");
|
||||
if (order != Ordered.NOT_ORDERED) {
|
||||
advisor.setOrder(order);
|
||||
}
|
||||
advisor.setOrder(((Integer)this.enableTx.get("order")));
|
||||
return advisor;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user