summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/node-impl
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-05-06 10:42:56 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-05-06 10:42:56 +0000
commitee3329b7c9d18db2d98c4e2276720fb6d6496c92 (patch)
treec54106a5955a5a1398607cfc619b5d45721c0011 /java/sca/modules/node-impl
parent0f9c38fd715a1d36255b5c3e02fa7259eee3bf99 (diff)
Fix for when domain name is null
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@772141 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/node-impl')
-rw-r--r--java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java b/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java
index d005f9ba34..47e838bad1 100644
--- a/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java
+++ b/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java
@@ -679,7 +679,7 @@ public class NodeImpl implements Node, Client, SCAClient {
// Start the composite
compositeActivator.start(composite);
- SCAClientImpl.addDomain(URI.create(configurationName), this);
+ SCAClientImpl.addDomain(getDomainName(), this);
} catch (ActivationException e) {
throw new IllegalStateException(e);
@@ -692,7 +692,7 @@ public class NodeImpl implements Node, Client, SCAClient {
try {
- SCAClientImpl.removeDomain(URI.create(configurationName));
+ SCAClientImpl.removeDomain(getDomainName());
// Stop the composite
compositeActivator.stop(composite);
@@ -705,6 +705,16 @@ public class NodeImpl implements Node, Client, SCAClient {
}
}
+
+ private URI getDomainName() {
+ URI domainName;
+ if (configurationName != null) {
+ domainName = URI.create(configurationName);
+ } else {
+ domainName = URI.create("default");
+ }
+ return domainName;
+ }
public void destroy() {
// Stop the runtime modules