On Feb 28, 2006, at 10:20 PM, Jeremy Boynes wrote:
Jim Marino wrote:
Any luck with converting the visitor stuff? Let me know if you
want me
to do some of it.
I got distracted looking at the Tomcat stuff again.
I ran into a wall with the visitor trying to figure out how to recurse
as during the build phase the new parent context has not yet been
built.
I think we have two options:
1) build but do not start the nested contexts during the build phase
thus allowing the ReferenceTargetFactory's to refer to them
2) configure the ReferenceTargetFactory's with the address of the
service rather than injecting the object itself and resolve the
reference on component start
I'm not sure #2 is possible, although I may be misunderstanding
things. RTF only stores the target component name and does a
resolution against the parent context when the source component is
injected. We still need a way for RTF to discover the parent context
of the source. The problem with nested contexts is the RTF parent
context is being set with the parent of the parent. I think we may
have to let the visitor register new contexts and push them onto a
stack. We may be getting a truly recursive SCA model soon and we will
probably need the ability to do this.
Jim
The latter seems the better solution as it is closer to what the
non-system references are doing. But that raises the question of
whether
we still need system contexts at all and I wanted to think a little
more
(hence the Tomcat distraction).
--
Jeremy