summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/builder/src
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2011-09-12 09:33:18 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2011-09-12 09:33:18 +0000
commitb2113b81f93f6113ba8e0ec57f775824d5da95db (patch)
treec28eee37d77b4406b38b8074dfd6d582272385cb /sca-java-2.x/trunk/modules/builder/src
parente7584f37352bfc0b0bc9a894fe4ca72817c16e8e (diff)
TUSCANY-3941 - If a reference specifies target in an SCA binding then we expect there to be an SCA binding at the service. In this case don't just select the first binding in the list.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1169664 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/builder/src')
-rw-r--r--sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/EndpointReferenceBuilderImpl.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/EndpointReferenceBuilderImpl.java b/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/EndpointReferenceBuilderImpl.java
index 4463248164..5dc0e40684 100644
--- a/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/EndpointReferenceBuilderImpl.java
+++ b/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/EndpointReferenceBuilderImpl.java
@@ -325,6 +325,11 @@ public class EndpointReferenceBuilderImpl {
// so that the binder can test it against the fully populated
// registry
endpoint = createEndpoint(component, uri);
+ if (binding instanceof SCABinding) {
+ // TUSCANY-3941
+ // if it's an SCA binding we store it to influence the matching at runtime
+ endpointRef.setBinding(binding);
+ }
endpointRef.setStatus(EndpointReference.Status.WIRED_TARGET_IN_BINDING_URI);
} catch (Exception ex) {
// the target string definitely isn't an SCA target string