summaryrefslogtreecommitdiffstats
path: root/sandbox/slaws/domain-view/src/main/java/org/apache/tuscany/sca/domain/interop/Tuscany.java
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2011-05-11 15:50:08 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2011-05-11 15:50:08 +0000
commit9ea6686aa690c68a7bdc875351c076b69a6f0fb2 (patch)
tree4ceb7ac7b1ff961ad467f96d7aff0f540426b11f /sandbox/slaws/domain-view/src/main/java/org/apache/tuscany/sca/domain/interop/Tuscany.java
parent069ff5365820c918eedfcb6aa943bf882dc77ac0 (diff)
Changes to exercise some of the new functions Ant is adding to the registry
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1101928 13f79535-47bb-0310-9956-ffa450edef68
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();
}
}