geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r736044 - in /geronimo/server/branches/2.1/framework/modules: geronimo-jmx-remoting/src/main/java/org/apache/geronimo/jmxremoting/ geronimo-kernel/src/main/java/org/apache/geronimo/kernel/rmi/
Date Tue, 20 Jan 2009 17:30:21 GMT
Author: dwoods
Date: Tue Jan 20 09:30:20 2009
New Revision: 736044

URL: http://svn.apache.org/viewvc?rev=736044&view=rev
Log:
GERONIMO-4518 Can't shutdown the server when host was set to 127.0.0.1 in config-substitutions.properties.
 Applied patch from Shawn Jiang.

Modified:
    geronimo/server/branches/2.1/framework/modules/geronimo-jmx-remoting/src/main/java/org/apache/geronimo/jmxremoting/JMXConnector.java
    geronimo/server/branches/2.1/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/rmi/GeronimoRMIClientSocketFactory.java

Modified: geronimo/server/branches/2.1/framework/modules/geronimo-jmx-remoting/src/main/java/org/apache/geronimo/jmxremoting/JMXConnector.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/framework/modules/geronimo-jmx-remoting/src/main/java/org/apache/geronimo/jmxremoting/JMXConnector.java?rev=736044&r1=736043&r2=736044&view=diff
==============================================================================
--- geronimo/server/branches/2.1/framework/modules/geronimo-jmx-remoting/src/main/java/org/apache/geronimo/jmxremoting/JMXConnector.java
(original)
+++ geronimo/server/branches/2.1/framework/modules/geronimo-jmx-remoting/src/main/java/org/apache/geronimo/jmxremoting/JMXConnector.java
Tue Jan 20 09:30:20 2009
@@ -188,7 +188,7 @@
         } else {
             log.warn("Starting unauthenticating JMXConnector for " + jmxServiceURL);
         }
-        RMIClientSocketFactory socketFactory = new GeronimoRMIClientSocketFactory(2 * 60
* 1000,  5 * 60 * 1000);
+        RMIClientSocketFactory socketFactory = new GeronimoRMIClientSocketFactory(host, 2
* 60 * 1000,  5 * 60 * 1000);
         env.put(RMIConnectorServer.RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE, socketFactory);
         RMIServerSocketFactory serverSocketFactory = new GeronimoRMIServerSocketFactory(host);
         env.put(RMIConnectorServer.RMI_SERVER_SOCKET_FACTORY_ATTRIBUTE, serverSocketFactory);

Modified: geronimo/server/branches/2.1/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/rmi/GeronimoRMIClientSocketFactory.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/rmi/GeronimoRMIClientSocketFactory.java?rev=736044&r1=736043&r2=736044&view=diff
==============================================================================
--- geronimo/server/branches/2.1/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/rmi/GeronimoRMIClientSocketFactory.java
(original)
+++ geronimo/server/branches/2.1/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/rmi/GeronimoRMIClientSocketFactory.java
Tue Jan 20 09:30:20 2009
@@ -31,15 +31,20 @@
     
     private int connectionTimeout = -1;
     private int readTimeout = -1;
+    private String host=null; 
 
-    public GeronimoRMIClientSocketFactory(int connectionTimeout, int readTimeout) {
+    public GeronimoRMIClientSocketFactory(String _host,int connectionTimeout, int readTimeout)
{
+        this.host=_host;
         this.connectionTimeout = connectionTimeout;
         this.readTimeout = readTimeout;
     }
     
-    public Socket createSocket(String host, int port) throws IOException {
+    public Socket createSocket(String _host, int port) throws IOException {
         Socket socket = new Socket();
-        socket.bind(null);        
+        socket.bind(null);
+        if(host==null){
+            host=_host;
+        }
         socket.connect(new InetSocketAddress(host, port), (this.connectionTimeout > 0)
? this.connectionTimeout : 0);        
         if (this.readTimeout >= 0) {
             socket.setSoTimeout(this.readTimeout);



Mime
View raw message