|
[
Permlink
| « Hide
]
Keith Garry Boyce added a comment - 26/Oct/05 05:14 PM
Here are the source files
Hi Keith, Juergen,
I'd like to point out that Incomplete References (to uncomplete or partly-defined beans) are significantly different to existing References in Spring usage. Any derivation code or active logic on a setter method in Bean B, is likely to break if Bean A has not actually had its properties init'd yet. Having said that, it would be rather nice to allow such circular/ graph dependencies to be constructed from Spring. Thanks for this work, Keith! For safety's sake however it would be preferable that the REF or (less accurately) the BEAN be explicitly specified as an Incomplete Reference. A few thoughts: - We could say EARLY-REF="BeanA" in the XML - But we've already got quite a few different REF attributes in various tags... so this would multiply DTD complexity. - We could say REF="BeanA; early" in the XML. - Or perhaps something like REF="early: BeanA". I think I like the REF="early: BeanA" format best. Less useful possibilities: - Saying <BEAN ID="BeanA" EARLY-REF="true"> would loosen all reference links, undesirably; - Rather than just 'lossening' the ones we need to loosen. - Saying REF="late: BeanB" or PROPERTY LATE could mean 'set this property after all the others'; - Which would fairly much suck for being excessively heavy and giving less control. Juergen, Keith, your thoughts ? Cheers, T I don't understand what you're driving at? Can you provide an example how you think the implementation is broke?
Hi Keith, my comment was thinking of Bidirectional Links/ Circular References in the object graph. The post may actually be more relevant to Beans XML and the bean factory, but some of the same issues may apply ?
|
|||||||||||||||||||||||||||||||||||||||||||||||