summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-06-13 21:39:56 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-06-13 21:39:56 +0000
commit5695a53ee03f7e92d426dfc650f11ef45e630bdc (patch)
tree1cee40fc816b0476f2b45e2e268ff5f46dd9f34f /sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java
parent3b4a10eca44bf3d579a5e1260fcf823cf52fd045 (diff)
Update for to use the domain uri and name from the registry and to use the domain name in the binding base uri for non-default domains
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1135297 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java')
-rw-r--r--sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java11
1 files changed, 4 insertions, 7 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 00eb2e7e06..0a840aa66f 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
@@ -57,7 +57,6 @@ import org.oasisopen.sca.NoSuchServiceException;
public class NodeImpl implements Node {
- private String domainName;
private Deployer deployer;
private CompositeActivator compositeActivator;
private DomainRegistry domainRegistry;
@@ -69,13 +68,11 @@ public class NodeImpl implements Node {
private Map<String, DeployedComposite> startedComposites = new HashMap<String, DeployedComposite>();
private Map<String, DeployedComposite> stoppedComposites = new HashMap<String, DeployedComposite>();
- public NodeImpl(String domainName,
- Deployer deployer,
+ public NodeImpl(Deployer deployer,
CompositeActivator compositeActivator,
DomainRegistry domainRegistry,
ExtensionPointRegistry extensionPointRegistry,
TuscanyRuntime tuscanyRuntime) {
- this.domainName = domainName;
this.deployer = deployer;
this.compositeActivator = compositeActivator;
this.domainRegistry = domainRegistry;
@@ -250,7 +247,7 @@ public class NodeImpl implements Node {
@Override
public void startComposite(String contributionURI, String compositeURI, String nodeName) throws ActivationException {
- String response = domainRegistry.remoteCommand(nodeName, new RemoteCommand(domainName, "start", contributionURI, compositeURI));
+ String response = domainRegistry.remoteCommand(nodeName, new RemoteCommand(domainRegistry.getDomainName(), "start", contributionURI, compositeURI));
if (!"Started.".equals(response)) {
throw new ActivationException(response);
}
@@ -269,7 +266,7 @@ public class NodeImpl implements Node {
if (member == null) {
throw new IllegalStateException("composite not started: " + compositeURI);
}
- RemoteCommand command = new RemoteCommand(domainName, "stop", contributionURI, compositeURI);
+ RemoteCommand command = new RemoteCommand(domainRegistry.getDomainName(), "stop", contributionURI, compositeURI);
String response = domainRegistry.remoteCommand(member, command);
if (!"Stopped.".equals(response)) {
throw new ActivationException(response);
@@ -278,7 +275,7 @@ public class NodeImpl implements Node {
}
public String getDomainName() {
- return domainName;
+ return domainRegistry.getDomainName();
}
public Composite getDomainComposite() {