You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Luciano Resende <lu...@gmail.com> on 2008/06/06 09:50:08 UTC
Reference with multiplicity being initialized with references to the same component
I was trying to use a reference with multiplicity (see composite
below), and looks like the reference is being populated with two
references for the same component, instead of one reference for each
component. Any ideas why this is happening ?
BTW, I'm using the Eclipse Plugin from 1.2 release to run the application.
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0"
targetNamespace="http://discover"
name="discover_enterprise">
<component name="EnterpriseDiscoverServiceComponent">
<implementation.java class="services.map.ConfigurationDiscoverFederator"/>
<reference name="resourceCatalog" multiplicity="0..n"
target="ComputerConfigurationDiscoverServiceComponent
NetworkConfigurationDiscoverServiceComponent">
<binding.ws/>
</reference>
</component>
<component name="ComputerConfigurationDiscoverServiceComponent">
<implementation.java class="services.map.ComputerConfigurationDiscover"/>
<service name="ResourceDiscover">
<binding.ws/>
</service>
</component>
<component name="NetworkConfigurationDiscoverServiceComponent">
<implementation.java class="services.map.NetworkConfigurationDiscover"/>
<service name="ResourceDiscover">
<binding.ws/>
</service>
</component>
</composite>
--
Luciano Resende
Apache Tuscany Committer
http://people.apache.org/~lresende
http://lresende.blogspot.com/
Re: Reference with multiplicity being initialized with references to the same component
Posted by Simon Laws <si...@googlemail.com>.
On Fri, Jun 6, 2008 at 8:50 AM, Luciano Resende <lu...@gmail.com>
wrote:
> I was trying to use a reference with multiplicity (see composite
> below), and looks like the reference is being populated with two
> references for the same component, instead of one reference for each
> component. Any ideas why this is happening ?
>
> BTW, I'm using the Eclipse Plugin from 1.2 release to run the application.
>
> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
> xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0"
> targetNamespace="http://discover"
> name="discover_enterprise">
>
> <component name="EnterpriseDiscoverServiceComponent">
> <implementation.java
> class="services.map.ConfigurationDiscoverFederator"/>
> <reference name="resourceCatalog" multiplicity="0..n"
> target="ComputerConfigurationDiscoverServiceComponent
> NetworkConfigurationDiscoverServiceComponent">
> <binding.ws/>
> </reference>
> </component>
>
> <component name="ComputerConfigurationDiscoverServiceComponent">
> <implementation.java
> class="services.map.ComputerConfigurationDiscover"/>
> <service name="ResourceDiscover">
> <binding.ws/>
> </service>
> </component>
>
> <component name="NetworkConfigurationDiscoverServiceComponent">
> <implementation.java
> class="services.map.NetworkConfigurationDiscover"/>
> <service name="ResourceDiscover">
> <binding.ws/>
> </service>
> </component>
> </composite>
>
>
> --
> Luciano Resende
> Apache Tuscany Committer
> http://people.apache.org/~lresende <http://people.apache.org/%7Elresende>
> http://lresende.blogspot.com/
>
Hi Luciano
Note sure although this code has changed a bit recently with the Endpoint
work. I'm renaming the EndpointProvider to be called EnpointResolver at the
moment so I'll take a look and see if this is still happening. Is this test
checked in?
Simon