summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-08-08 15:57:57 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-08-08 15:57:57 +0000
commit9e0d3fff1af8ee331488d52c29f5b804325db524 (patch)
tree8a34d18de990490bdbd75ad29802ac068c965e2a
parent70b64f446536e4860e0726b23da0ef24f21d9637 (diff)
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
-rw-r--r--java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentServiceEndpointBuilderImpl.java8
1 files 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);