Problem resolving references with external targets
--------------------------------------------------

                 Key: TUSCANY-657
                 URL: http://issues.apache.org/jira/browse/TUSCANY-657
             Project: Tuscany
          Issue Type: Bug
          Components: Java SCA Core
    Affects Versions: Java-Mx
         Environment: Java
            Reporter: Joel Hawkins
         Attachments: retailer_warehouse.scdl

Taken from the DevList thread:

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)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to