summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-2.x')
-rw-r--r--sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/DeployedComposite.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/DeployedComposite.java b/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/DeployedComposite.java
index 21d20ff6a1..ce3713324c 100644
--- a/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/DeployedComposite.java
+++ b/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/DeployedComposite.java
@@ -20,8 +20,10 @@
package org.apache.tuscany.sca.impl;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import javax.xml.namespace.QName;
@@ -82,7 +84,14 @@ public class DeployedComposite {
contributions.get(0).getDeployables().add(composite);
Monitor monitor = deployer.createMonitor();
- builtComposite = deployer.build(contributions, dependedOnContributions, new HashMap<QName, List<String>>(), monitor);
+ Map<QName, List<String>> bs = new HashMap<QName, List<String>>();
+
+ // TODO: don't hardcode the default domain name, instead do something like having a property on Node that says whether or not the
+ // domain name should be included in the service uri
+ if (!"default".equals(domainRegistry.getDomainURI())) {
+ bs.put(new QName("default"), Arrays.asList(new String[]{domainRegistry.getDomainURI()}));
+ }
+ builtComposite = deployer.build(contributions, dependedOnContributions, bs, monitor);
// TODO: Ideally deployer.build would set the name and uri to what this needs
builtComposite.setName(composite.getName());
builtComposite.setURI(composite.getURI());