summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/node-impl
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-05-16 08:03:50 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-05-16 08:03:50 +0000
commitc148dc21980189096868c5d8edd05040b90dd68d (patch)
treece371450cabc3b9c567db7c94d092c8104edab7b /java/sca/modules/node-impl
parent1c2b666f894bbbeecd823fce65319ea6e6f9cc2e (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')
-rw-r--r--java/sca/modules/node-impl/META-INF/MANIFEST.MF1
-rw-r--r--java/sca/modules/node-impl/pom.xml7
-rw-r--r--java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java21
3 files changed, 8 insertions, 21 deletions
diff --git a/java/sca/modules/node-impl/META-INF/MANIFEST.MF b/java/sca/modules/node-impl/META-INF/MANIFEST.MF
index 5feccbf81d..fcf9d25ad0 100644
--- a/java/sca/modules/node-impl/META-INF/MANIFEST.MF
+++ b/java/sca/modules/node-impl/META-INF/MANIFEST.MF
@@ -22,7 +22,6 @@ Import-Package: javax.xml.namespace,
org.apache.tuscany.sca.assembly;version="2.0.0",
org.apache.tuscany.sca.assembly.builder;version="2.0.0",
org.apache.tuscany.sca.assembly.xml;version="2.0.0",
- org.apache.tuscany.sca.client.impl;version="2.0.0",
org.apache.tuscany.sca.contribution;version="2.0.0",
org.apache.tuscany.sca.contribution.processor;version="2.0.0",
org.apache.tuscany.sca.contribution.resolver;version="2.0.0",
diff --git a/java/sca/modules/node-impl/pom.xml b/java/sca/modules/node-impl/pom.xml
index 5231d40b65..7918805412 100644
--- a/java/sca/modules/node-impl/pom.xml
+++ b/java/sca/modules/node-impl/pom.xml
@@ -71,13 +71,6 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca-client-impl</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
<artifactId>tuscany-binding-sca</artifactId>
<version>2.0-SNAPSHOT</version>
<scope>runtime</scope>
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) {