INT-1257, added namespace support for specifying name patterns for tracked components

This commit is contained in:
Oleg Zhurakousky
2010-08-31 19:19:16 +00:00
parent 812a8c657f
commit 3982994704
4 changed files with 88 additions and 10 deletions

View File

@@ -16,12 +16,12 @@
package org.springframework.integration.config.xml;
import org.w3c.dom.Element;
import org.springframework.beans.factory.BeanDefinitionStoreException;
import org.springframework.beans.factory.support.AbstractBeanDefinition;
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
import org.springframework.beans.factory.xml.AbstractSimpleBeanDefinitionParser;
import org.springframework.beans.factory.xml.ParserContext;
import org.w3c.dom.Element;
/**
* @author Oleg Zhurakousky
@@ -49,5 +49,14 @@ public class MessageHistoryParser extends AbstractSimpleBeanDefinitionParser {
}
return CONFIGURER_CLASSNAME;
}
protected void postProcess(BeanDefinitionBuilder beanDefinition, Element element) {
}
protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) {
IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "tracked-components", "componentNamePatterns");
postProcess(builder, element);
}
}

View File

@@ -2454,6 +2454,17 @@ only be one Message History writer per ApplicationContext hierarchy.
]]>
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:attribute name="tracked-components" type="xsd:string" default="*">
<xsd:annotation>
<xsd:documentation>
<![CDATA[
The list of component name patterns you want to track (e.g., tracked-components="inputChannel, out*, *Channel, *Service")
]]>
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
</xsd:complexType>
</xsd:element>
<xsd:attributeGroup name="inputOutputChannelGroup">