diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2008-09-06 06:08:56 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2008-09-06 06:08:56 +0000 |
commit | c5f7e037e1f5d3148493d6b7178d63a2c8407a52 (patch) | |
tree | 03d22de52ec832b209541c9fcb9cd3a9965ad6cc /java | |
parent | 9eadabfbf44beef2a1825f6a9c877449c374f420 (diff) |
Port from SCADomain to SCANode
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@692615 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
3 files changed, 10 insertions, 14 deletions
diff --git a/java/sca/modules/implementation-node-runtime/pom.xml b/java/sca/modules/implementation-node-runtime/pom.xml index c040b44d11..bc4f0ae7bf 100644 --- a/java/sca/modules/implementation-node-runtime/pom.xml +++ b/java/sca/modules/implementation-node-runtime/pom.xml @@ -62,12 +62,6 @@ <dependency> <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> - <version>1.4-SNAPSHOT</version> - </dependency> - - <dependency> - <groupId>org.apache.tuscany.sca</groupId> <artifactId>tuscany-node-impl</artifactId> <version>1.4-SNAPSHOT</version> <scope>runtime</scope> diff --git a/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationDaemonBootstrap.java b/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationDaemonBootstrap.java index 7d5954b3fd..8de2a3a3f9 100644 --- a/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationDaemonBootstrap.java +++ b/java/sca/modules/implementation-node-runtime/src/main/java/org/apache/tuscany/sca/implementation/node/launcher/NodeImplementationDaemonBootstrap.java @@ -19,8 +19,8 @@ package org.apache.tuscany.sca.implementation.node.launcher; -import org.apache.tuscany.sca.host.embedded.SCADomain; import org.apache.tuscany.sca.node.SCANode; +import org.apache.tuscany.sca.node.SCANodeFactory; /** * Bootstrap class for the SCA node daemon. @@ -36,7 +36,7 @@ public class NodeImplementationDaemonBootstrap { public static class NodeFacade implements SCANode { private ClassLoader threadContextClassLoader; private ClassLoader runtimeClassLoader; - private SCADomain daemon; + private SCANode daemon; private NodeFacade() { runtimeClassLoader = Thread.currentThread().getContextClassLoader(); @@ -47,7 +47,8 @@ public class NodeImplementationDaemonBootstrap { boolean started = false; try { Thread.currentThread().setContextClassLoader(runtimeClassLoader); - daemon = SCADomain.newInstance("NodeDaemon.composite"); + SCANodeFactory factory = SCANodeFactory.newInstance(); + daemon = factory.createSCANodeFromClassLoader("NodeDaemon.composite", threadContextClassLoader); started = true; } finally { if (!started) { @@ -59,7 +60,7 @@ public class NodeImplementationDaemonBootstrap { public void stop() { try { Thread.currentThread().setContextClassLoader(runtimeClassLoader); - daemon.close(); + daemon.stop(); } finally { Thread.currentThread().setContextClassLoader(threadContextClassLoader); } diff --git a/java/sca/modules/implementation-node-runtime/src/test/java/org/apache/tuscany/sca/implementation/node/NodeImplementationTestCase.java b/java/sca/modules/implementation-node-runtime/src/test/java/org/apache/tuscany/sca/implementation/node/NodeImplementationTestCase.java index c25e952b69..73475f49fe 100644 --- a/java/sca/modules/implementation-node-runtime/src/test/java/org/apache/tuscany/sca/implementation/node/NodeImplementationTestCase.java +++ b/java/sca/modules/implementation-node-runtime/src/test/java/org/apache/tuscany/sca/implementation/node/NodeImplementationTestCase.java @@ -20,7 +20,8 @@ package org.apache.tuscany.sca.implementation.node; import junit.framework.TestCase; -import org.apache.tuscany.sca.host.embedded.SCADomain; +import org.apache.tuscany.sca.node.SCANode; +import org.apache.tuscany.sca.node.SCANodeFactory; /** * Test case for node component implementations. @@ -29,16 +30,16 @@ import org.apache.tuscany.sca.host.embedded.SCADomain; */ public class NodeImplementationTestCase extends TestCase { - private SCADomain scaDomain; + private SCANode node; @Override protected void setUp() throws Exception { - scaDomain = SCADomain.newInstance("TestNode.composite"); + node = SCANodeFactory.newInstance().createSCANodeFromClassLoader("TestNode.composite", null); } @Override protected void tearDown() throws Exception { - scaDomain.close(); + node.stop(); } public void testNode() { |