diff options
Diffstat (limited to 'java')
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() { |