|
As discussed with Christian, I've revised the inline pointcut handling to use inner bean definitions instead of a reference to a generated anonymous bean. This makes the BeanDefinition available as inner bean definition, avoiding the need for a separate PointcutComponentDefinition for an inline pointcut in the first place. Juergen Fixed in CVS HEAD (Spring 2.1 M3) as well as mbranch-2-0 (Spring 2.0.6). Let me know if there are any remaining issues... Juergen |
||||||||||||||||||||||||||||||||||||||
Torsten,
XmlReaderContext.registerWithGeneratedName() itself should not and cannot register a component, since that's a facility only available for a specific ParserContext. What we could consider instead is a corresponding registerWithGeneratedName() method on ParserContext, performing the component registration as well.
However, that doesn't seem to be necessary for the usual cases: The specific BeanDefinitionParser implementations are responsible for registering appropriate components, with the bean definitions and generated bean names mentioned in such a specific ComponentDefinition. This is also what the AOP ConfigBeanDefinitionParser does in general.
Since Christian mentioned a problem with ConfigBeanDefinitionParser in particular, I've checked its registration behavior: It didn't register the generated bean definition for a pointcut attribute with any specific component before. I've addressed this through registering a PointcutComponentDefinition for such a pointcut attribute as well.
This ConfigBeanDefinitionParser fix is already in CVS HEAD. Please give it a try and let me know whether it is sufficient for your purposes...
Juergen