Venkaat, Thanks! Found the problem. As it turns out, the Launcher code has drifted quite a bit. I'd created an OSGiLauncher based on code that was a couple of weeks old (whenever I checked in the initial support). This code was loading the application into a SystemCompositeImpl rather than a plain CompositeImpl. The CompositeBuilder builds bound references, the SystemCompositeBuilder only builds bound services. Not sure if this is intentional.
Anyway, seeing your working RMI example helped me see where the real problem had to be. Thanks again, Joel -----Original Message----- From: Venkata Krishnan [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 23, 2006 6:58 AM To: [email protected] Subject: Re: Composite Reference Example Hi, Could it be that the scdl contains <references> and then within that <reference>. Is there an element as <references>. Anyways, here is an scdl I used for the RMI Binding. To me it seems similar in structure to what Joel is using. This works there. <composite xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:rmi=" http://tuscany.apache.org/xmlns/binding/rmi/1.0-SNAPSHOT" name="HelloWorldRmiComposite"> <service name="HelloWorldRmiService" target="HelloWorldServiceComponent"> <interface.java interface="helloworld.HelloWorldService"/> <rmi:binding.rmi host="localhost" port="1099" serviceName="HelloWorldRemoteService" /> <reference>HelloWorldServiceComponent</reference> </service> <component name="HelloWorldServiceComponent"> <implementation.java class="helloworld.HelloWorldImpl"/> </component> <component name="HelloWorldRmiServiceComponent"> <implementation.java class="helloworld.HelloWorldRmiImpl"/> <reference name="extService" target="HelloWorldRmiReference">HelloWorldRmiReference</reference> </component> <reference name="HelloWorldRmiReference" target="Nothing"> <interface.java interface="helloworld.HelloWorldService"/> <rmi:binding.rmi host="localhost" port="1099" serviceName="HelloWorldRemoteService" /> </reference> </composite> Thanks Venkat On 8/23/06, Hawkins, Joel <[EMAIL PROTECTED]> wrote: > > Jim, > > TUSCANY-657. > > Thanks for looking at this. > > Cheers, > Joel > > -----Original Message----- > From: Hawkins, Joel [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 22, 2006 11:04 AM > To: [email protected] > Subject: Composite Reference Example > > Can anyone point me to an example that uses a Composite Reference? I > noticed that the one in BigBank is commented out. > > I'm having trouble testing OSGi support against the latest code. I've > got a sample that looks like this: > > <composite xmlns="http://www.osoa.org/xmlns/sca/1.0" > xmlns:osgi="http://tuscany.apache.org/xmlns/osgi/1.0" > name="Retailer_Warehouse"> > > <service name="RetailerService" target="RetailerComponent"> > <interface.java > interface="mypackage.Retailer"/> > <osgi:binding.osgi > service="mypackage.Retailer"/> > <reference>RetailerComponent</reference> > </service> > > <reference name="ShipperReference" override="may" > multiplicity="0..n"> > <interface.java > interface="mypackage.Shipper"/> > <osgi:binding.osgi > service="mypackage.Shipper" > filter="(objectclass=mypackage.Shipper)" > immediate="false"/> > </reference> > > <component name="RetailerComponent"> > <implementation.java class="mypackage.RetailerComponentImpl/> > <references> > <reference name="warehouse" target="WarehouseComponent"/> > </references> > </component> > > <component name="WarehouseComponent"> > <implementation.java class="mypackage.WarehouseComponentImpl"/> > <references> > <reference name="shipper">ShipperReference</reference> > </references> > </component> > > </composite> > > According to the spec, it should be legal for the target of the > "shipper" reference to be a Composite Reference (in this case, > ShipperReference): > > "A composite reference is a valid target of a wire. In this case, the > name of the reference is the > value set on the wire targeting the reference". (pg 24 of the v.95 > spec). > > However, the composite above fails when ConnectorImpl attempts to locate > the target (the parent's children map contains only components and > services, no composite references). Is the problem with my Composite > definition, or is the problem with Tuscany? > > Thanks, > Joel > The contents of this e-mail are intended for the named addressee only. > It contains information that may be confidential. Unless you are the > named addressee or an authorized designee, you may not copy or use it, > or disclose it to anyone else. If you received it in error please notify > us immediately and then destroy it. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > The contents of this e-mail are intended for the named addressee only. It > contains information that may be confidential. Unless you are the named > addressee or an authorized designee, you may not copy or use it, or disclose > it to anyone else. If you received it in error please notify us immediately > and then destroy it. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
