karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject git commit: [KARAF-3112]make stopTimeout of AdminService configurable (cherry picked from commit f6ebe33c719c2c230d2d281a5e154862e4d56dd0)
Date Fri, 11 Jul 2014 09:49:15 GMT
Repository: karaf
Updated Branches:
  refs/heads/master d32c7bf10 -> b4b7b57fc


[KARAF-3112]make stopTimeout of AdminService configurable
(cherry picked from commit f6ebe33c719c2c230d2d281a5e154862e4d56dd0)


Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/b4b7b57f
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/b4b7b57f
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/b4b7b57f

Branch: refs/heads/master
Commit: b4b7b57fc4ebf39da46dc03b88cd1868ad5c0ccd
Parents: d32c7bf
Author: Freeman Fang <freeman.fang@gmail.com>
Authored: Fri Jul 11 17:38:33 2014 +0800
Committer: Freeman Fang <freeman.fang@gmail.com>
Committed: Fri Jul 11 17:45:10 2014 +0800

----------------------------------------------------------------------
 .../karaf/instance/core/internal/InstanceServiceImpl.java      | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/b4b7b57f/instance/src/main/java/org/apache/karaf/instance/core/internal/InstanceServiceImpl.java
----------------------------------------------------------------------
diff --git a/instance/src/main/java/org/apache/karaf/instance/core/internal/InstanceServiceImpl.java
b/instance/src/main/java/org/apache/karaf/instance/core/internal/InstanceServiceImpl.java
index bb698e9..5700e43 100644
--- a/instance/src/main/java/org/apache/karaf/instance/core/internal/InstanceServiceImpl.java
+++ b/instance/src/main/java/org/apache/karaf/instance/core/internal/InstanceServiceImpl.java
@@ -71,6 +71,8 @@ public class InstanceServiceImpl implements InstanceService {
     private static final String KARAF_SHUTDOWN_COMMAND = "karaf.shutdown.command";
 
     private static final String KARAF_SHUTDOWN_PID_FILE = "karaf.shutdown.pid.file";
+    
+    private static final String KARAF_SHUTDOWN_TIMEOUT = "karaf.shutdown.timeout";
 
     private static final String DEFAULT_SHUTDOWN_COMMAND = "SHUTDOWN";
 
@@ -761,7 +763,9 @@ public class InstanceServiceImpl implements InstanceService {
                 Socket s = new Socket(host, port);
                 s.getOutputStream().write(shutdown.getBytes());
                 s.close();
-                long t = System.currentTimeMillis() + getStopTimeout();
+                long stopTimeout = Long.parseLong(props.getProperty(KARAF_SHUTDOWN_TIMEOUT,

+                                                                    Long.toString(getStopTimeout())));
+                long t = System.currentTimeMillis() + stopTimeout;
                 do {
                     Thread.sleep(100);
                     checkPid(instance);


Mime
View raw message