]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-4898 improve support of JMX IP address in multihomed servers
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Fri, 1 Aug 2014 13:37:57 +0000 (15:37 +0200)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Fri, 1 Aug 2014 13:37:57 +0000 (15:37 +0200)
server/sonar-process/src/main/java/org/sonar/process/ProcessWrapper.java

index 9033640937e7914206130065d632a71dd4de0e7e..795f9c5bbc719d7ec6743d1cb89627776beb8931 100644 (file)
@@ -60,8 +60,10 @@ public class ProcessWrapper extends Thread implements Terminable {
   static {
     // by default there's no timeout on RMI calls on client-side
     // http://docs.oracle.com/javase/6/docs/technotes/guides/rmi/sunrmiproperties.html
-    System.setProperty("sun.rmi.transport.tcp.responseTimeout", "5000");
+    System.setProperty("sun.rmi.transport.connectionTimeout", "5000");
     System.setProperty("sun.rmi.transport.tcp.handshakeTimeout", "5000");
+    System.setProperty("sun.rmi.transport.tcp.handshakeTimeout", "5000");
+    System.setProperty("sun.rmi.transport.tcp.readTimeout", "5000");
   }
 
   private final static Logger LOGGER = LoggerFactory.getLogger(ProcessWrapper.class);
@@ -264,6 +266,7 @@ public class ProcessWrapper extends Thread implements Terminable {
   }
 
   private String localAddress() {
+    // TODO to be replaced by InetAddress.getLoopbackAddress() in Java 7
     return "127.0.0.1";
   }