summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/node-api/src/main
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-04-25 21:29:34 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-04-25 21:29:34 +0000
commit56446f84a20f778777530f0ad6da129ecab325e8 (patch)
tree5341972dff5d65abee3b64872d4b470c79473156 /sca-java-2.x/trunk/modules/node-api/src/main
parentdcab49af067762f3f34d424dac998f5e8b34c149 (diff)
Update NodeFactory to set the default domain name property
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@937885 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/node-api/src/main')
-rw-r--r--sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java5
1 files changed, 4 insertions, 1 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 d7370ba513..adef3dffb0 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
@@ -202,6 +202,7 @@ public abstract class NodeFactory extends DefaultNodeConfigurationFactory {
protected NodeFactory() {
this.properties = new Properties();
properties.setProperty("defaultScheme", "vm");
+ properties.setProperty("defaultDomainName", "default");
}
public static NodeFactory newInstance(Properties configProperties) {
@@ -230,7 +231,8 @@ public abstract class NodeFactory extends DefaultNodeConfigurationFactory {
} else if (configURI.startsWith("uri:")) {
properties = parseConfigURI(configURI.substring("uri:".length()));
} else {
- throw new IllegalArgumentException("config should start with 'uri:' or 'properties:'");
+ properties = new Properties();
+ properties.setProperty("defaultDomainName", configURI);
}
return newInstance(properties);
}
@@ -545,6 +547,7 @@ public abstract class NodeFactory extends DefaultNodeConfigurationFactory {
private NodeConfiguration createConfiguration(Contribution... contributions) {
NodeConfigurationFactory factory = this;
NodeConfiguration configuration = factory.createNodeConfiguration();
+ configuration.setDomainURI(properties.getProperty("defaultDomainName"));
// Make sure a unique node URI is created for the same node factory
configuration.setURI(generateNodeURI());
if (contributions != null) {