summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/domain-node/src/main/java
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-06-17 14:44:07 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-06-17 14:44:07 +0000
commitdbd04b3daff024d841bc6ab74be964f0510c10fb (patch)
tree9d3911a434415d29ee9f290a5bbf857e75b12a72 /sca-java-2.x/trunk/modules/domain-node/src/main/java
parentf047ab5cd60fa4cd765afac1d2caffad9f9e4fd9 (diff)
When uninstalling a contribution also remove any stopped DeployedComposites so that they get correctly rebuilt afresh on a re-start
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1136894 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/domain-node/src/main/java')
-rw-r--r--sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java b/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java
index 2abc441728..68d8191d91 100644
--- a/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java
+++ b/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java
@@ -24,6 +24,7 @@ import java.io.StringReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
+import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
@@ -132,6 +133,15 @@ public class NodeImpl implements Node {
public void uninstallContribution(String contributionURI) {
domainRegistry.uninstallContribution(contributionURI);
+
+ // remove any stopped composite that used the contribution
+ Iterator<String> i = stoppedComposites.keySet().iterator();
+ while (i.hasNext()) {
+ DeployedComposite dc = stoppedComposites.get(i.next());
+ if (dc.getContributionURIs().contains(contributionURI)) {
+ i.remove();
+ }
+ }
}
protected void mergeContributionMetaData(String metaDataURL, Contribution contribution) throws ValidationException {