diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2008-10-09 06:33:54 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2008-10-09 06:33:54 +0000 |
commit | efe3363a815a777ecd283928900404dea84a7e1f (patch) | |
tree | 42522fd01e6af981f8ff94663d911d56744154d5 /branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox | |
parent | aacabe1650e380595a8d701123394d791656d17d (diff) |
Work in progress. Fixed implementation of NodeImpl, now working without dependencies on implementations from other bundles (except RuntimeAssemblyFactory, which will need to be cleaned up too). Started to remove dependencies on host-embedded and port code to NodeFactory and Node, as an interim step to bring them up, before porting them to the OSGi-enabled node launcher.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@703068 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox')
-rw-r--r-- | branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/NodeLauncher.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/NodeLauncher.java b/branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/NodeLauncher.java index 614c34b01e..68d1fa05e7 100644 --- a/branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/NodeLauncher.java +++ b/branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/NodeLauncher.java @@ -64,7 +64,7 @@ public class NodeLauncher { * @return a new SCA node. * @throws LauncherException */ - public <T> T createNodeFromURL(String configurationURL) throws LauncherException { + public <T> T createNode(String configurationURL) throws LauncherException { return (T)node(configurationURL, null, null, null, bundleContext); } @@ -113,7 +113,7 @@ public class NodeLauncher { // Create a node from a configuration URI String configurationURI = args[0]; logger.info("SCA Node configuration: " + configurationURI); - node = launcher.createNodeFromURL(configurationURI); + node = launcher.createNode(configurationURI); } else { // Create a node from a composite URI and a contribution location @@ -157,7 +157,7 @@ public class NodeLauncher { // Stop the node if (node != null) { - stopNode(node); + destroyNode(node); } if (equinox != null) { equinox.stop(); @@ -178,9 +178,10 @@ public class NodeLauncher { * @param node * @throws Exception */ - private static void stopNode(Object node) throws Exception { + private static void destroyNode(Object node) throws Exception { try { node.getClass().getMethod("stop").invoke(node); + node.getClass().getMethod("destroy").invoke(node); logger.info("SCA Node is now stopped."); } catch (Exception e) { logger.log(Level.SEVERE, "SCA Node could not be stopped", e); @@ -200,7 +201,7 @@ public class NodeLauncher { public void run() { try { - stopNode(node); + destroyNode(node); } catch (Exception e) { // Ignore } |