You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Scott Kurz (JIRA)" <de...@tuscany.apache.org> on 2011/09/08 06:19:08 UTC

[jira] [Created] (TUSCANY-3941) Reference with may be resolved with another binding when target service is exposed over multiple bindings

Posted by "Simon Laws (JIRA)" <de...@tuscany.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-3941?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simon Laws closed TUSCANY-3941.
-------------------------------

    Resolution: Fixed

Fix committed at r1169664

> Reference with <binding.sca uri="targetService> may be resolved with another binding when target service is exposed over multiple bindings
> ------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-3941
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3941
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Assembly Model
>    Affects Versions: Java-SCA-2.x
>            Reporter: Scott Kurz
>            Assignee: Simon Laws
>            Priority: Minor
>
> If I have a service exposed over multiple bindings (including binding.sca) and I target it from component reference:
>  <reference name="xxx">
>      <binding.sca uri="targetService"/>
>  </reference>
> then the runtime should use binding.sca to perform the invocation.     
> However, I'm noticing this isn't always the case.    It seems that the runtime is treating this case similar to:
>  <reference name="xxx" target="targetService"/>
> in which case it is up to the runtime to pick the binding (if there are no other intents, etc.).  
> In a couple tests I've run the runtime seems to pick the first binding in order listed in the target service SCDL, which is wrong when the 
> resolution is done with binding child elements rather than the @target attr.
> -----
> One itest I happen to have just worked with which can be used to recreate this is the set of tests in testing/itest/data-copy.
> If, starting from that directory, I change client/src/main/resources/helloworld-client.composite to: 
>     ...
>    <component name="ClientSCA">
>       <implementation.java class="itest.client.impl.ClientImpl"/>
>       <reference name="service">
>           <binding.sca uri="Service"/>
>        ...
> then I will still get binding.sca on this invocation, since in 
> service/src/main/resources/helloworld-service.composite I have:
>     <component name="Service">
>        <implementation.java class="itest.service.impl.ServiceImpl"/>
>        <service name="ServiceIntf">
>            <binding.sca name="sca"/>
>            <binding.ws name="ws" uri="http://localhost:8085/Service/ServiceIntf"/>
>             ....
> However, if I switch the order of <binding.sca>, <binding.ws>  in the service SCDL, I will end up getting binding.ws on the invocation.
> (Note you should need the debugger or some other method... I don't recall the test is designed to fail if the "wrong" binding is used). 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (TUSCANY-3941) Reference with may be resolved with another binding when target service is exposed over multiple bindings

Posted by "Simon Laws (JIRA)" <de...@tuscany.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-3941?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13100176#comment-13100176 ] 

Simon Laws commented on TUSCANY-3941:
-------------------------------------

Sounds right Scott that if you specific binding.sca at the target then we should be trying to match with binding.sca at the service. It's wrong at the moment because when we perform the match in EndpointReferenceBinderImpl we first the first endpoint that matches based on interface and policy. We don't take account of the special case where binding.sca has been specified on the reference. 

> Reference with <binding.sca uri="targetService> may be resolved with another binding when target service is exposed over multiple bindings
> ------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-3941
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3941
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Assembly Model
>    Affects Versions: Java-SCA-2.x
>            Reporter: Scott Kurz
>            Priority: Minor
>
> If I have a service exposed over multiple bindings (including binding.sca) and I target it from component reference:
>  <reference name="xxx">
>      <binding.sca uri="targetService"/>
>  </reference>
> then the runtime should use binding.sca to perform the invocation.     
> However, I'm noticing this isn't always the case.    It seems that the runtime is treating this case similar to:
>  <reference name="xxx" target="targetService"/>
> in which case it is up to the runtime to pick the binding (if there are no other intents, etc.).  
> In a couple tests I've run the runtime seems to pick the first binding in order listed in the target service SCDL, which is wrong when the 
> resolution is done with binding child elements rather than the @target attr.
> -----
> One itest I happen to have just worked with which can be used to recreate this is the set of tests in testing/itest/data-copy.
> If, starting from that directory, I change client/src/main/resources/helloworld-client.composite to: 
>     ...
>    <component name="ClientSCA">
>       <implementation.java class="itest.client.impl.ClientImpl"/>
>       <reference name="service">
>           <binding.sca uri="Service"/>
>        ...
> then I will still get binding.sca on this invocation, since in 
> service/src/main/resources/helloworld-service.composite I have:
>     <component name="Service">
>        <implementation.java class="itest.service.impl.ServiceImpl"/>
>        <service name="ServiceIntf">
>            <binding.sca name="sca"/>
>            <binding.ws name="ws" uri="http://localhost:8085/Service/ServiceIntf"/>
>             ....
> However, if I switch the order of <binding.sca>, <binding.ws>  in the service SCDL, I will end up getting binding.ws on the invocation.
> (Note you should need the debugger or some other method... I don't recall the test is designed to fail if the "wrong" binding is used). 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira