From 9e0d3fff1af8ee331488d52c29f5b804325db524 Mon Sep 17 00:00:00 2001 From: slaws Date: Sat, 8 Aug 2009 15:57:57 +0000 Subject: Make endpoints point to the component/service for which they are created so that the URIs are correct. A previous change to the runtime wire now looks down the promotion hierarchy in order to find the leaf component and service git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@802403 13f79535-47bb-0310-9956-ffa450edef68 --- .../builder/impl/ComponentServiceEndpointBuilderImpl.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentServiceEndpointBuilderImpl.java b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentServiceEndpointBuilderImpl.java index fd04c809ca..89b98ad9ad 100644 --- a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentServiceEndpointBuilderImpl.java +++ b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentServiceEndpointBuilderImpl.java @@ -89,6 +89,9 @@ public class ComponentServiceEndpointBuilderImpl implements CompositeBuilder { // create an endpoint for each component service binding for (ComponentService service : component.getServices()) { + /* 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; @@ -100,11 +103,12 @@ public class ComponentServiceEndpointBuilderImpl implements CompositeBuilder { endpointService = ServiceConfigurationUtil.getPromotedComponentService(compositeService); endpointComponent = ServiceConfigurationUtil.getPromotedComponent(compositeService); } // end if + */ for (Binding binding : service.getBindings()) { Endpoint endpoint = assemblyFactory.createEndpoint(); - endpoint.setComponent(endpointComponent); - endpoint.setService(endpointService); + endpoint.setComponent(component); + endpoint.setService(service); endpoint.setBinding(binding); endpoint.setUnresolved(false); service.getEndpoints().add(endpoint); -- cgit v1.2.3