On Wed, Aug 3, 2011 at 8:37 PM, Greg Dritschler
<greg.dritsch...@gmail.com> wrote:
> I have the following composites:
> Composite A has a component reference myService with binding.sca uri="X".
>  The reference is promoted.
> Composite B has a component that uses A as its implementation.  It redefines
> reference myService and specifies binding.sca uri="Y".
> I get the error
> [ASM50022] Too many targets on reference: myService
> I've found that EndpointReferenceBuilderImpl.pushDownEndpointReferences() is
> adding the endpoint references from the outer component reference to the
> inner component reference.  This doesn't seem like it applies in this case.
>  My understanding is that bindings configured on the outer component
> reference override bindings that would otherwise have been inherited from
> the promoted reference.  pushDownEndpointReferences() was introduced in
> revision 833132 which says:
>     "Fix motivated by ASM-5023. Update code to reflect the OASIS treatment
> of promoted references. Endpoint references are now copied down to the
> promoted component reference and the multiplicity validation is performed
> there."
> ASM-5023 uses reference target.  If I were using reference target instead of
> binding uri, then I would agree I have an error (assuming multiplicity 0..n
> or 1..n), since reference targets are additive.  But I'm not using reference
> target.
> Greg
>

Hi Greg

I think the only useful URI on a reference binding.sca is the name of
a target service. This is equivalent to specifying the same target
service via the target attribute. I think though that you're arguing
that the top level binding configuration should override the lower
level binding configuration?

Simon


-- 
Apache Tuscany committer: tuscany.apache.org
Co-author of a book about Tuscany and SCA: tuscanyinaction.com

Reply via email to