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

Reply via email to