Ambiguous wire target is not reported as an error
-------------------------------------------------

                 Key: TUSCANY-4005
                 URL: https://issues.apache.org/jira/browse/TUSCANY-4005
             Project: Tuscany
          Issue Type: Bug
    Affects Versions: Java-SCA-2.0
            Reporter: Greg Dritschler
            Priority: Minor


I have a component reference with a target that includes only a component name.

        <reference name="xyz" target="MultipleServiceComponent"/>

The target component has multiple services.  According to the following text in 
the assembly specification, the target component must have one and only one 
service with a compatible interface.

 1844 If <service-name> is not present, the target component MUST have one and 
only
 1845 one service with an interface that is a compatible superset of the wire 
source's
 1845 interface and satisifies the policy requirements of the wire source, and 
the SCA
 1846 runtime MUST use this service for the wire. [ASM60048]

This implies to me that if there are multiple services with compatible 
interfaces, I should get an error.  This does not happen.  Instead the first 
match is taken.  It's unclear to me why there needs to be only one match.  If 
there are multiple matches that satisfy the interface and the policy 
requirements, it seems like using any of the matches is just as good.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to