Comments inline.

Raymond Feng wrote:
Hi,

As captured at http://cwiki.apache.org/TUSCANYWIKI/multiple-bindings-and-reference-multiplicity.html, a reference can use "target" attribute or binding uri to declare the outbound endpoints. Multiplicity and promotion complicate the picture even more.

I'd like others familiar with the spec to review this table too, but it looks good to me.


I suggest that we internally (for example, in CompositeBuilderImpl) normalize the reference bindings as illustrated by column 4 of the tables in the wiki page. Then the runtime can follow the two simple rules:

Rule #1. Binding with a specified endpoint = a wire
Rule #2. Multiplicity is about the number of wires allowed for the reference

+1 for normalizing reference bindings as you suggest.


It might require we add something such as "resolvedEndpoint" to the Binding interface (leaving the "uri" attribute to host the value from SCDL). For SCA reference binding, the resolvedEndpoint could be the Component/ComponentService.

I think we can update the URI attribute in place like we already do for many other cases where we normalize or "compile" the assembly model. Having two different attributes would create confusion on how to use these two attributes and when to set one or the other when you construct an in-memory model.

To handle multiplicity, I think we should clone bindings (one per target), as opposed to maintaining a list of target endpoints on a binding.

Finally, looking at how the SCA binding works now, I propose the following changes: - remove or deprecate the component field (which was a hack, it's time to clean it up)
- add a targetBinding field pointing to the SCABinding on the target service


What do you guys think?

Thanks,
Raymond

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




--
Jean-Sebastien


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

Reply via email to