Using the ParserContext's delegate instead of manually resolving the parser for custom elements.

This commit is contained in:
Mark Fisher
2008-12-10 16:30:42 +00:00
parent 5feb4c9ba1
commit 71543d7dca

View File

@@ -152,10 +152,8 @@ public abstract class IntegrationNamespaceUtils {
pollerMetadataRef = pollerElement.getAttribute("ref");
}
else {
ParserContext childContext = new ParserContext(
parserContext.getReaderContext(), parserContext.getDelegate(), targetBuilder.getBeanDefinition());
BeanDefinition beanDefinition = parserContext.getReaderContext().getNamespaceHandlerResolver().resolve(
pollerElement.getNamespaceURI()).parse(pollerElement, childContext);
BeanDefinition beanDefinition = parserContext.getDelegate().parseCustomElement(
pollerElement, targetBuilder.getBeanDefinition());
Assert.notNull(beanDefinition, "BeanDefinition must not be null");
Assert.isInstanceOf(AbstractBeanDefinition.class, beanDefinition);
pollerMetadataRef = BeanDefinitionReaderUtils.registerWithGeneratedName(