diff options
Diffstat (limited to 'sca-java-2.x/trunk/modules')
-rw-r--r-- | sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/ComponentContextImpl.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/ComponentContextImpl.java b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/ComponentContextImpl.java index 7a45c25982..470ed168cc 100644 --- a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/ComponentContextImpl.java +++ b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/ComponentContextImpl.java @@ -159,14 +159,21 @@ public class ComponentContextImpl implements RuntimeComponentContext { // The default binding name is the name of the promoted service bindingName = getPromotedService(service).getName(); } + Endpoint returnEp = null; List<Endpoint> eps = service.getEndpoints(); for (Endpoint ep : eps) { Binding binding = ep.getBinding(); if (bindingName.equals(binding.getName()) || binding.getName() == null) { - return ep; + returnEp = ep; + break; } } - return null; + //TUSCANY-3543 + if(returnEp == null) { + returnEp = eps.get(0); + } + + return returnEp; } private ComponentService getPromotedService(ComponentService componentService) { |