diff options
Diffstat (limited to 'java/sca/modules/builder')
2 files changed, 5 insertions, 30 deletions
diff --git a/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/EndpointBuilderImpl.java b/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/EndpointBuilderImpl.java index 6b181db0c1..ca13532bcf 100644 --- a/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/EndpointBuilderImpl.java +++ b/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/EndpointBuilderImpl.java @@ -104,25 +104,9 @@ public class EndpointBuilderImpl implements CompositeBuilder { } } - - - - /* change to finding the promoted component and service - * when the wire is created as storing them here leads to - * the wrong URI being calculated - Component endpointComponent = component; - ComponentService endpointService = service; - - // TODO - EPR - We maintain all endpoints at the right level now - // but endpoints for promoting services must point down - // to the services they promote. - if (service.getService() instanceof CompositeService) { - CompositeService compositeService = (CompositeService)service.getService(); - endpointService = ServiceConfigurationUtil.getPromotedComponentService(compositeService); - endpointComponent = ServiceConfigurationUtil.getPromotedComponent(compositeService); - } // end if - */ - + // We maintain all endpoints at the right level now + // but endpoints for promoting services must point down + // to the services they promote. for (Binding binding : service.getBindings()) { Endpoint endpoint = assemblyFactory.createEndpoint(); endpoint.setComponent(component); diff --git a/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/EndpointReferenceBuilderImpl.java b/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/EndpointReferenceBuilderImpl.java index df941e8879..be55be3bbe 100644 --- a/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/EndpointReferenceBuilderImpl.java +++ b/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/EndpointReferenceBuilderImpl.java @@ -218,25 +218,16 @@ public class EndpointReferenceBuilderImpl { String uri = component.getName() + '/' + componentService.getName(); componentServices.put(uri, componentService); - // TODO - EPR - $promoted$ no longer used but it doesn't do any - // harm here - boolean promotedService = false; - if (componentService.getName() != null && componentService.getName().indexOf("$promoted$") > -1) { - promotedService = true; - } - - // count how many non-callback, non-promoted services there are + // count how many non-callback services there are // if there is only one the component name also acts as the // service name - if ((!componentService.isForCallback()) && (!promotedService)) { - + if (!componentService.isForCallback()) { // Check how many non callback non-promoted services we have if (nonCallbackServices == 0) { nonCallbackService = componentService; } nonCallbackServices++; } - } if (nonCallbackServices == 1) { |