diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2008-07-30 20:37:07 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2008-07-30 20:37:07 +0000 |
commit | f4fe8ce437b8ba7ba45882d3dda8facc7c9bef0f (patch) | |
tree | 0677fe780d32a0c6b1bd4ccf5eb3d44b68c01ebb /java/sca/modules/domain-manager | |
parent | 4723a495f0682128a612aa0c59414214a6316554 (diff) |
Switch to SCANode2 API
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@681196 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/domain-manager')
-rw-r--r-- | java/sca/modules/domain-manager/pom.xml | 10 | ||||
-rw-r--r-- | java/sca/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/launcher/DomainManagerLauncherBootstrap.java | 13 |
2 files changed, 17 insertions, 6 deletions
diff --git a/java/sca/modules/domain-manager/pom.xml b/java/sca/modules/domain-manager/pom.xml index 52fb5d5796..af6d35fa40 100644 --- a/java/sca/modules/domain-manager/pom.xml +++ b/java/sca/modules/domain-manager/pom.xml @@ -67,9 +67,17 @@ <dependency> <groupId>org.apache.tuscany.sca</groupId> - <artifactId>tuscany-host-embedded</artifactId> + <artifactId>tuscany-node2-api</artifactId> <version>1.4-SNAPSHOT</version> </dependency> + + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-node2-impl</artifactId> + <version>1.4-SNAPSHOT</version> + <scope>runtime</scope> + </dependency> + <dependency> <groupId>org.apache.tuscany.sca</groupId> diff --git a/java/sca/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/launcher/DomainManagerLauncherBootstrap.java b/java/sca/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/launcher/DomainManagerLauncherBootstrap.java index 379f8b81cb..3e78073264 100644 --- a/java/sca/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/launcher/DomainManagerLauncherBootstrap.java +++ b/java/sca/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/launcher/DomainManagerLauncherBootstrap.java @@ -20,8 +20,9 @@ package org.apache.tuscany.sca.domain.manager.launcher; import org.apache.tuscany.sca.domain.manager.impl.DomainManagerConfiguration; -import org.apache.tuscany.sca.host.embedded.SCADomain; +import org.apache.tuscany.sca.node.SCAClient; import org.apache.tuscany.sca.node.SCANode2; +import org.apache.tuscany.sca.node.SCANode2Factory; /** * Bootstrap class for the SCA domain manager. @@ -37,7 +38,7 @@ public class DomainManagerLauncherBootstrap { public static class NodeFacade implements SCANode2 { private ClassLoader threadContextClassLoader; private ClassLoader runtimeClassLoader; - private SCADomain domainManager; + private SCANode2 node; private String rootDirectory; private NodeFacade(String rootDirectory) { @@ -50,10 +51,12 @@ public class DomainManagerLauncherBootstrap { boolean started = false; try { Thread.currentThread().setContextClassLoader(runtimeClassLoader); - domainManager = SCADomain.newInstance("DomainManager.composite"); + SCANode2Factory factory = SCANode2Factory.newInstance(); + node = factory.createSCANodeFromClassLoader("DomainManager.composite", getClass().getClassLoader()); + node.start(); // Set the domain manager's root directory - DomainManagerConfiguration domainManagerConfiguration = domainManager.getService(DomainManagerConfiguration.class, "DomainManagerConfigurationComponent"); + DomainManagerConfiguration domainManagerConfiguration = ((SCAClient) node).getService(DomainManagerConfiguration.class, "DomainManagerConfigurationComponent"); domainManagerConfiguration.setRootDirectory(rootDirectory); started = true; @@ -67,7 +70,7 @@ public class DomainManagerLauncherBootstrap { public void stop() { try { Thread.currentThread().setContextClassLoader(runtimeClassLoader); - domainManager.close(); + node.stop(); } finally { Thread.currentThread().setContextClassLoader(threadContextClassLoader); } |