|
From: <jue...@we...> - 2004-06-15 21:41:56
|
There is an interesting feature request in our JIRA: http://opensource.atlassian.com/projects/spring/browse/SPR-166 Basically, a bean should be able to reference a bean of the same name in = the parent context, for example to proxy it. =20 Currently, a reference to the same bean name will lead to a self = reference. I'm not keen on changing this, as there might be valid use = cases for such a configuration. =20 I quite like Damon's suggestion: introduce a "parent" attribute for the = <ref> tag, as alternative to "bean" and "local". Such a reference = explicity refers to a bean in the parent context rather than in the = current one. =20 I've already implemented this: was straightforward to do, with = RuntimeBeanReference having an optional "toParent" flag now. =20 As this is fully backward-compatible and a nice (though probably rarely = used) enhancement, I don't mind including this in 1.0.3. Opinions? =20 Juergen |