|
From: <jue...@we...> - 2004-06-17 19:26:47
|
Any opinions on this? I've already prototypically implemented it, and = all tests pass. Just waiting whether there are any objections, or = different naming proposals :-) =20 Juergen =20 ________________________________ Von: spr...@li... im Auftrag = von j=FCrgen h=F6ller [werk3AT] Gesendet: Di 15.06.2004 23:41 An: spr...@li... Betreff: [Springframework-developer] Explicit reference to bean in = parent context 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. 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. 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. I've already implemented this: was straightforward to do, with = RuntimeBeanReference having an optional "toParent" flag now. 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? Juergen ------------------------------------------------------- This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: Colin S. <col...@ex...> - 2004-06-17 19:44:13
|
Sorry, I meant to reply and completely forgot about it. I think this is a decent idea, and have been unable to think of any nagative possibilities arising out of it... Colin jürgen höller [werk3AT] wrote: >Any opinions on this? I've already prototypically implemented it, and all tests pass. Just waiting whether there are any objections, or different naming proposals :-) > >Juergen > > >________________________________ > >Von: spr...@li... im Auftrag von jürgen höller [werk3AT] >Gesendet: Di 15.06.2004 23:41 >An: spr...@li... >Betreff: [Springframework-developer] Explicit reference to bean in parent context > > > >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. > >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. > >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. > >I've already implemented this: was straightforward to do, with RuntimeBeanReference having an optional "toParent" flag now. > >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? > >Juergen > > |
|
From: Rod J. <rod...@in...> - 2004-06-18 09:39:19
|
+1 ----- Original Message ----- From: "Colin Sampaleanu" <col...@ex...> To: <spr...@li...> Sent: Thursday, June 17, 2004 8:48 PM Subject: Re: [Springframework-developer] Explicit reference to bean in parent context > Sorry, I meant to reply and completely forgot about it. I think this is > a decent idea, and have been unable to think of any nagative > possibilities arising out of it... > > Colin > > j=FCrgen h=F6ller [werk3AT] wrote: > > >Any opinions on this? I've already prototypically implemented it, and = all tests pass. Just waiting whether there are any objections, or different naming proposals :-) > > > >Juergen > > > > > >________________________________ > > > >Von: spr...@li... im Auftrag = von j=FCrgen h=F6ller [werk3AT] > >Gesendet: Di 15.06.2004 23:41 > >An: spr...@li... > >Betreff: [Springframework-developer] Explicit reference to bean in par= ent context > > > > > > > >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. > > > >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 cas= es for such a configuration. > > > >I quite like Damon's suggestion: introduce a "parent" attribute for th= e <ref> tag, as alternative to "bean" and "local". Such a reference explici= ty refers to a bean in the parent context rather than in the current one. > > > >I've already implemented this: was straightforward to do, with RuntimeBeanReference having an optional "toParent" flag now. > > > >As this is fully backward-compatible and a nice (though probably rarel= y used) enhancement, I don't mind including this in 1.0.3. Opinions? > > > >Juergen > > > > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference > Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer > Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA > REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKN= D > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > |
|
From: James C. <jim...@do...> - 2004-06-17 22:19:38
|
> Any opinions on this? I've already prototypically implemented it, and all > tests pass. Just waiting whether there are any objections, or different > naming proposals :-) > > Juergen I've read before in the docs that Spring offers this parent-child bean contexts. This isn't the same thing as loading multiple contexts like in the servlet examples, correct? I take it these are all siblings? If so, the parent/child type of context implies the feature that one context can override beans declared in a child context, or perhaps the other way around? I think in those cases there may be some obscure reasons why a child may want to access the parent bean it overrides. Possibly because of a delegation type relationship. |