Yea it appears wrong. The builder should set the parent of the source. Currently, this is set in SystemAggregateContextImpl (line 302). I'm wondering if the new builder component is setting its parent as opposed to the source parent?

Jim

On Feb 27, 2006, at 6:48 PM, Jeremy Boynes wrote:

I have been having issues with trying to get a reference between two
system components in the same module working (see Tuscany-43, 45 and
46). I've worked around most but I am now seeing a problem when it tries
to resolve the reference:
org.apache.tuscany.core.context.TargetException: Component not found
[org.apache.tuscany.core.loader.SCDLModelLoaderRegistry]
Context stack trace: [tuscany.system]
    at
org.apache.tuscany.core.system.context.SystemAggregateContextImpl.loca teInstance(SystemAggregateContextImpl.java:475)
    at
org.apache.tuscany.core.injection.ReferenceTargetFactory.getInstance (ReferenceTargetFactory.java:129)
    at
org.apache.tuscany.core.injection.FieldInjector.inject (FieldInjector.java:40)
    at
org.apache.tuscany.core.injection.PojoObjectFactory.getInstance (PojoObjectFactory.java:64)
    at
org.apache.tuscany.core.system.context.SystemComponentContext.getInsta nce(SystemComponentContext.java:110)
    at
org.apache.tuscany.core.context.scope.ModuleScopeContext.initComponent Contexts(ModuleScopeContext.java:173)
    at
org.apache.tuscany.core.context.scope.ModuleScopeContext.onEvent (ModuleScopeContext.java:65)
    at
org.apache.tuscany.core.system.context.SystemAggregateContextImpl.fire Event(SystemAggregateContextImpl.java:427)
    at
org.apache.tuscany.core.client.TuscanyRuntime.<init> (TuscanyRuntime.java:131)
    at
org.apache.tuscany.core.client.TuscanyRuntime.<init> (TuscanyRuntime.java:76)
    at
org.apache.tuscany.samples.helloworld.HelloWorldServiceComponentTestCa se.testGeetings(HelloWorldServiceComponentTestCase.java:38)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

When looking up in the scopeIndex it seems to be attempting to resolve
against the "tuscany.system" context but the components are defined in
the  "org.apache.tuscany.core.system" context.

Is the parent "tuscany.system" wrong here, and if so how do we associate
the ReferenceTargetFactory with the right one?

--
Jeremy


Reply via email to