[
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