summaryrefslogtreecommitdiffstats
path: root/sandbox/slaws/domain-view/src/main/java/org/apache/tuscany/sca/domain/interop/Tuscany.java
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox/slaws/domain-view/src/main/java/org/apache/tuscany/sca/domain/interop/Tuscany.java')
-rw-r--r--sandbox/slaws/domain-view/src/main/java/org/apache/tuscany/sca/domain/interop/Tuscany.java27
1 files changed, 4 insertions, 23 deletions
diff --git a/sandbox/slaws/domain-view/src/main/java/org/apache/tuscany/sca/domain/interop/Tuscany.java b/sandbox/slaws/domain-view/src/main/java/org/apache/tuscany/sca/domain/interop/Tuscany.java
index bafd818355..aac7ce7aaa 100644
--- a/sandbox/slaws/domain-view/src/main/java/org/apache/tuscany/sca/domain/interop/Tuscany.java
+++ b/sandbox/slaws/domain-view/src/main/java/org/apache/tuscany/sca/domain/interop/Tuscany.java
@@ -26,9 +26,8 @@ import java.net.ServerSocket;
import java.net.Socket;
import java.net.URL;
-import org.apache.tuscany.sca.node.Contribution;
-import org.apache.tuscany.sca.node.Node;
-import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.Node;
+import org.apache.tuscany.sca.TuscanyRuntime;
/**
* Main class for Tuscany. Just looking at what it means to read config from a directory structure.
@@ -37,7 +36,6 @@ import org.apache.tuscany.sca.node.NodeFactory;
public class Tuscany {
public static Node node = null;
- private static Node domain = null;
public static void main(String[] args) throws Exception {
String domainName = args[0];
@@ -57,29 +55,13 @@ public class Tuscany {
File nodeDirectory = findDirectory(currentDirectory, nodeName);
System.out.println("Node: " + nodeDirectory.getPath());
- // start a node with the node configuration
-/* don't know how to start the node using the following
TuscanyRuntime tuscanyRuntime = TuscanyRuntime.newInstance();
- Node node = tuscanyRuntime.createNodeFromXML(nodeDirectory.getPath() +
- File.separator +
- "node.xml");
-*/
- NodeFactory nodeFactory = NodeFactory.newInstance();
-
- // temporarily use the Tuscany runtime to expose domain services
- // for looking at the domain in a RESTful way. Replace with more
- // integrated code!
- domain = nodeFactory.createNode(new Contribution("domain", "target/classes"));
- domain.start();
URL nodeConfigURL = nodeDirectory.toURI().resolve("node.xml").toURL();
- node = nodeFactory.createNode(nodeConfigURL);
-
+ node = tuscanyRuntime.createNodeFromXML(nodeConfigURL.toString());
try {
- node.start();
-
- // Use ? to provide web access to the domain details.
+ //node.start();
// for testing we're going to set up a deamon that listens for
// a shutdown message on a specified port (well it actually just
@@ -111,7 +93,6 @@ public class Tuscany {
} finally {
node.stop();
- domain.stop();
}
}