summaryrefslogtreecommitdiffstats
path: root/java/sca/modules
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2008-07-31 01:27:51 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2008-07-31 01:27:51 +0000
commitf47f6707497e8645da513d6abbe9fe280e0b7fe2 (patch)
tree05ac9ef78d424451cd6fa2d1828d71750f935b28 /java/sca/modules
parentfdcf095935dcc6e0fd73ce5554467c18b78c0be1 (diff)
Node launcher gets IOException from System.in and fails when started as a detached daemon on Linux.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@681252 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules')
-rw-r--r--java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/DomainManagerLauncher.java9
-rw-r--r--java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeDaemonLauncher.java9
-rw-r--r--java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeLauncher.java9
3 files changed, 24 insertions, 3 deletions
diff --git a/java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/DomainManagerLauncher.java b/java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/DomainManagerLauncher.java
index fa199bfa45..e962491b25 100644
--- a/java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/DomainManagerLauncher.java
+++ b/java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/DomainManagerLauncher.java
@@ -90,7 +90,14 @@ public class DomainManagerLauncher {
logger.info("Press enter to shutdown.");
try {
System.in.read();
- } catch (IOException e) {}
+ } catch (IOException e) {
+
+ // Wait forever
+ Object lock = new Object();
+ synchronized(lock) {
+ lock.wait();
+ }
+ }
// Stop the domain manager
try {
diff --git a/java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeDaemonLauncher.java b/java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeDaemonLauncher.java
index 64af0b8849..2756bf2073 100644
--- a/java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeDaemonLauncher.java
+++ b/java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeDaemonLauncher.java
@@ -79,7 +79,14 @@ public class NodeDaemonLauncher {
logger.info("Press enter to shutdown.");
try {
System.in.read();
- } catch (IOException e) {}
+ } catch (IOException e) {
+
+ // Wait forever
+ Object lock = new Object();
+ synchronized(lock) {
+ lock.wait();
+ }
+ }
// Stop the node daemon
try {
diff --git a/java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeLauncher.java b/java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeLauncher.java
index 1c19ac0c08..44a5430976 100644
--- a/java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeLauncher.java
+++ b/java/sca/modules/node2-launcher/src/main/java/org/apache/tuscany/sca/node/launcher/NodeLauncher.java
@@ -129,7 +129,14 @@ public class NodeLauncher {
logger.info("Press enter to shutdown.");
try {
System.in.read();
- } catch (IOException e) {}
+ } catch (IOException e) {
+
+ // Wait forever
+ Object lock = new Object();
+ synchronized(lock) {
+ lock.wait();
+ }
+ }
// Stop the node
try {