Hi,

We ran into some issues to deal with various combinations for reference 
multiplicity, multiple bindings and promotion at Tuscany. I try to 
understand the semantics for the cases listed at 
http://cwiki.apache.org/confluence/display/TUSCANYWIKI/Multiple+bindings+and+reference+multiplicity.
 
Please look into the effective wire column which contains my understandings 
and/or confusions.

I would appreciate if somebody can answer the following questions.

1) Is the following reference valid? Please note we use the binding uri to 
specify the endpoints and multiplicity=1.1.

<reference name="R1" multiplicity="1..1">
    <binding.x name="x" uri="http://a"/>
    <binding.y name="y" uri="http://b"/>
</reference>

2) How do we interpret the following declaration?

<reference name="R1" multiplicity="1..N">
    <binding.x name="x" uri="http://a"/>
    <binding.y name="y" uri="http://b"/>
</reference>

Does the reference R1 has two targets: http://a (binding.x) and http://b 
(binding.y)? i.e., cardinatity=2?

3) Are the following references equivalent?

<reference name="R1" multiplicity="1..N" target="C2/S1 C3/S1">
    <binding.sca/>
</reference>

<reference name="R1" multiplicity="1..N">
    <binding.sca uri="C2/S1"/>
    <binding.sca uri="C3/S1"/>
</reference>

4) For a reference promotion as follows, Is it valid to override the target? 
If so, would the final target be C3/S1 over binding.x?

The component reference with multiplicity = 1..1:
<component name="C1">
    <reference name="R1" target="C2/S1">
    </reference>
</component>

The composite reference:
<reference name="R1" promote="C1/R1" target="C3/S1">
    <binding.x>
</reference>

5) For a reference promotion as follows:

The component reference with multiplicity = 1..N:
<component name="C1">
    <reference name="R1" target="C2/S1"/>
</component>

The composite reference:
<reference name="R1" promote="C1/R1" target="C3/S1"/>

Would this promotion end up with two effective wires?
a) C1/R1-->C2/S1 (binding.sca) for internal wire in the composite
b) C1/R1-->C3/S1 (binding.sca)

Thanks,
Raymond Feng
[EMAIL PROTECTED]

Reply via email to