summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java b/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java
index defb607b16..82d0304b78 100644
--- a/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java
+++ b/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java
@@ -301,8 +301,15 @@ public abstract class NodeFactory extends DefaultNodeConfigurationFactory {
}
public final Node createNode(URI configURI, String... locations) {
+ return createNode(configURI, null, locations);
+ }
+
+ public final Node createNode(URI configURI, String deploymentCompositeURI, String[] locations) {
Contribution[] contributions = getContributions(Arrays.asList(locations));
NodeConfiguration configuration = createConfiguration(contributions);
+ if (deploymentCompositeURI != null && configuration.getContributions().size() > 0) {
+ configuration.getContributions().get(0).addDeploymentComposite(createURI(deploymentCompositeURI));
+ }
configuration.setDomainRegistryURI(configURI.toString());
configuration.setDomainURI(getDomainName(configURI));
return createNode(configuration);