diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2011-06-19 07:44:31 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2011-06-19 07:44:31 +0000 |
commit | e0d0f979b56b452bf01ea99e14f8037c633942ae (patch) | |
tree | b195cb1ac65a87252d2d64cb4662280c52caf912 /sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java | |
parent | 82d2e8d40f5b562b13faba064cf2b5323343e2ae (diff) |
Update contribution update to handle additional deployed composites and a testcase for that
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1137311 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r-- | sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java | 14 |
1 files changed, 11 insertions, 3 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 619ec985ab..2614845945 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 @@ -119,15 +119,23 @@ public class NodeImpl implements Node { uninstallContribution(uri); installContribution(uri, contributionURL, metaDataURL, dependentContributionURIs); + + // merge in additional deployables + if (ic.getAdditionalDeployables().size() > 0) { + ContributionDescription newIC = getInstalledContribution(uri); + newIC.getAdditionalDeployables().putAll(ic.getAdditionalDeployables()); + domainRegistry.updateInstalledContribution(newIC); + } // stop/start all started composites using the contribution for (DeployedComposite dc : new ArrayList<DeployedComposite>(startedComposites.values())) { if (dc.getContributionURIs().contains(uri)) { + String dcContributionURI = dc.getContributionURIs().get(0); String dcCompositeURI = dc.getURI(); - stopComposite(uri, dcCompositeURI); - String key = uri + "/" + dcCompositeURI; + stopComposite(dcContributionURI, dcCompositeURI); + String key = dcContributionURI + "/" + dcCompositeURI; stoppedComposites.remove(key); - startComposite(uri, dcCompositeURI); + startComposite(dcContributionURI, dcCompositeURI); } } |