added chaining-capable "add" method to MutablePropertyValues
This commit is contained in:
@@ -92,7 +92,7 @@ class AnnotationDrivenBeanDefinitionParser implements BeanDefinitionParser {
|
||||
}
|
||||
|
||||
private static void registerTransactionManager(Element element, BeanDefinition def) {
|
||||
def.getPropertyValues().addPropertyValue("transactionManagerBeanName",
|
||||
def.getPropertyValues().add("transactionManagerBeanName",
|
||||
TxNamespaceHandler.getTransactionManagerName(element));
|
||||
}
|
||||
|
||||
@@ -119,17 +119,17 @@ class AnnotationDrivenBeanDefinitionParser implements BeanDefinitionParser {
|
||||
interceptorDef.setSource(eleSource);
|
||||
interceptorDef.setRole(BeanDefinition.ROLE_INFRASTRUCTURE);
|
||||
registerTransactionManager(element, interceptorDef);
|
||||
interceptorDef.getPropertyValues().addPropertyValue("transactionAttributeSource", new RuntimeBeanReference(sourceName));
|
||||
interceptorDef.getPropertyValues().add("transactionAttributeSource", new RuntimeBeanReference(sourceName));
|
||||
String interceptorName = parserContext.getReaderContext().registerWithGeneratedName(interceptorDef);
|
||||
|
||||
// Create the TransactionAttributeSourceAdvisor definition.
|
||||
RootBeanDefinition advisorDef = new RootBeanDefinition(BeanFactoryTransactionAttributeSourceAdvisor.class);
|
||||
advisorDef.setSource(eleSource);
|
||||
advisorDef.setRole(BeanDefinition.ROLE_INFRASTRUCTURE);
|
||||
advisorDef.getPropertyValues().addPropertyValue("transactionAttributeSource", new RuntimeBeanReference(sourceName));
|
||||
advisorDef.getPropertyValues().addPropertyValue("adviceBeanName", interceptorName);
|
||||
advisorDef.getPropertyValues().add("transactionAttributeSource", new RuntimeBeanReference(sourceName));
|
||||
advisorDef.getPropertyValues().add("adviceBeanName", interceptorName);
|
||||
if (element.hasAttribute("order")) {
|
||||
advisorDef.getPropertyValues().addPropertyValue("order", element.getAttribute("order"));
|
||||
advisorDef.getPropertyValues().add("order", element.getAttribute("order"));
|
||||
}
|
||||
parserContext.getRegistry().registerBeanDefinition(TRANSACTION_ADVISOR_BEAN_NAME, advisorDef);
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ class TxAdviceBeanDefinitionParser extends AbstractSingleBeanDefinitionParser {
|
||||
|
||||
RootBeanDefinition attributeSourceDefinition = new RootBeanDefinition(NameMatchTransactionAttributeSource.class);
|
||||
attributeSourceDefinition.setSource(parserContext.extractSource(attrEle));
|
||||
attributeSourceDefinition.getPropertyValues().addPropertyValue(NAME_MAP, transactionAttributeMap);
|
||||
attributeSourceDefinition.getPropertyValues().add(NAME_MAP, transactionAttributeMap);
|
||||
return attributeSourceDefinition;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user