summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/builder/src/main
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-06-18 18:06:51 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-06-18 18:06:51 +0000
commit7550f843640527f1ece148b804d3b3c7348027ad (patch)
treeaa623d49094d6ba43146cee652f5432a7a1337ae /sca-java-2.x/trunk/modules/builder/src/main
parenta0bfcca6d80126b004e787aa049be5a745d24532 (diff)
Clear out old endpoints before adding the binding endpoints. Without this you get duplicated endpoints when reusing contributions. It may be that we need a better way of resetting this and other things for restarts
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1137222 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/builder/src/main')
-rw-r--r--sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/EndpointBuilderImpl.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/EndpointBuilderImpl.java b/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/EndpointBuilderImpl.java
index c1ba47661a..0c25790920 100644
--- a/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/EndpointBuilderImpl.java
+++ b/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/EndpointBuilderImpl.java
@@ -113,6 +113,7 @@ public class EndpointBuilderImpl implements CompositeBuilder {
// uri is calculated correctly
// Callback endpoints may not be added here in the case that the
// forward reference is not yet resolved.
+ service.getEndpoints().clear();
for (Binding binding : service.getBindings()) {
Endpoint endpoint = assemblyFactory.createEndpoint();
endpoint.setComponent(component);