You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Jim Marino <jm...@myroma.net> on 2006/03/01 00:29:43 UTC
Re: Reference resolution question
Any luck with converting the visitor stuff? Let me know if you want
me to do some of it.
Jim
On Feb 28, 2006, at 11:51 AM, Jim Marino wrote:
> It sounds like we should just fix the visitor. What do you think?
>
>
> On Feb 28, 2006, at 11:42 AM, Jeremy Boynes wrote:
>
>
>> Jim Marino wrote:
>>
>>
>>> As a hack would setting the module component implementation to null
>>> work? If this worked, I think it should only be temporary and we
>>> should
>>> do the recursion solution since others will run into this.
>>>
>>>
>>>
>>
>> That was my first attempt and it NPEs - it may be possible to
>> detect the
>> null and quit processing at that point but I was not sure what impact
>> that would have. I'll try it.
>>
>> --
>> Jeremy
>>
>
Re: Reference resolution question
Posted by Jim Marino <jm...@myroma.net>.
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
>
Re: Reference resolution question
Posted by Jeremy Boynes <jb...@apache.org>.
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
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