diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2009-05-16 08:03:50 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2009-05-16 08:03:50 +0000 |
commit | c148dc21980189096868c5d8edd05040b90dd68d (patch) | |
tree | ce371450cabc3b9c567db7c94d092c8104edab7b /java/sca/modules/node-impl/src/main | |
parent | 1c2b666f894bbbeecd823fce65319ea6e6f9cc2e (diff) |
Decouple node-impl from sca-client-impl
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@775426 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/node-impl/src/main')
-rw-r--r-- | java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java | 21 |
1 files changed, 8 insertions, 13 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 15794d9581..c6f1df2086 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 @@ -52,7 +52,6 @@ import org.apache.tuscany.sca.assembly.Composite; import org.apache.tuscany.sca.assembly.CompositeService; import org.apache.tuscany.sca.assembly.builder.CompositeBuilder; import org.apache.tuscany.sca.assembly.builder.CompositeBuilderExtensionPoint; -import org.apache.tuscany.sca.client.impl.SCAClientImpl; import org.apache.tuscany.sca.contribution.Artifact; import org.apache.tuscany.sca.contribution.Contribution; import org.apache.tuscany.sca.contribution.ContributionFactory; @@ -92,6 +91,7 @@ import org.apache.tuscany.sca.monitor.Problem; import org.apache.tuscany.sca.monitor.Problem.Severity; import org.apache.tuscany.sca.node.Client; import org.apache.tuscany.sca.node.Node; +import org.apache.tuscany.sca.node.NodeFinder; import org.apache.tuscany.sca.node.configuration.ContributionConfiguration; import org.apache.tuscany.sca.node.configuration.DeploymentComposite; import org.apache.tuscany.sca.node.configuration.NodeConfiguration; @@ -140,6 +140,8 @@ public class NodeImpl implements Node, Client, SCAClient { private WorkScheduler workScheduler; private Contribution systemContribution; private Definitions systemDefinitions; + + private URI domainURI; NodeImpl(NodeConfiguration configuration) { logger.log(Level.INFO, "Creating node: " + configuration.getURI()); @@ -284,6 +286,9 @@ public class NodeImpl implements Node, Client, SCAClient { } private void configureNode(NodeConfiguration configuration) throws Exception { + + domainURI = URI.create(configuration.getDomainURI()); + List<Contribution> contributions = new ArrayList<Contribution>(); // Load the specified contributions @@ -548,7 +553,7 @@ public class NodeImpl implements Node, Client, SCAClient { compositeActivator.start(composite); } - SCAClientImpl.addDomain(getDomainName(), this); + NodeFinder.addNode(domainURI, this); return this; @@ -563,7 +568,7 @@ public class NodeImpl implements Node, Client, SCAClient { try { - SCAClientImpl.removeDomain(getDomainName()); + NodeFinder.removeNode(domainURI); List<Composite> composites = compositeActivator.getDomainComposite().getIncludes(); for (Composite composite : composites) { @@ -582,16 +587,6 @@ 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 for (ModuleActivator moduleActivator : moduleActivators) { |