diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2012-09-07 10:00:21 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2012-09-07 10:00:21 +0000 |
commit | ac3a63c3aa963e3a50ecea543765fd6cfb154c57 (patch) | |
tree | 91e1db139bd02f1510b53670ae767d2b6d3e4a48 /sca-java-2.x/trunk | |
parent | 8703d5325103787385aebf296ee36edccb500d76 (diff) |
TUSCANY-4069: Apply patch from Rashmi Hunt to fix Issue with resolving autowired reference when binding is not defined to a target service exposed over multiple bindings
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1381971 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk')
-rw-r--r-- | sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java index 647cd12a32..4ce163f389 100644 --- a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java +++ b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java @@ -493,6 +493,16 @@ public class EndpointReferenceBinderImpl implements EndpointReferenceBinder { } } } + + // TUSCANY-4069 if no binding specified on reference then use service binding.sca if that exists + if (endpointReference.getBinding() == null && endpointReference.getReference().getAutowire() == true){ + for (Endpoint endpoint : matchedEndpoints){ + if (endpoint.getBinding() instanceof SCABinding){ + matchedEndpoint = endpoint; + break; + } + } + } if (matchedEndpoint == null) { // just take the first matched endpoint from the list |