You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by vi...@apache.org on 2014/02/04 19:53:45 UTC

svn commit: r1564417 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java webapps/docs/changelog.xml

Author: violetagg
Date: Tue Feb  4 18:53:45 2014
New Revision: 1564417

URL: http://svn.apache.org/r1564417
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56096
Merged revisions 1564299, 1564414 from tomcat/trunk:
When creating JMXConnectorServer use the correct rmiBindAddress. Patch provided by Jim Talbut.

Modified:
    tomcat/tc7.0.x/trunk/   (props changed)
    tomcat/tc7.0.x/trunk/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java
    tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
  Merged /tomcat/trunk:r1564299,1564414

Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java?rev=1564417&r1=1564416&r2=1564417&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java Tue Feb  4 18:53:45 2014
@@ -256,7 +256,7 @@ public class JmxRemoteLifecycleListener 
 
 
             // Create the Platform server
-            csPlatform = createServer("Platform", rmiRegistryPortPlatform,
+            csPlatform = createServer("Platform", rmiBindAddress, rmiRegistryPortPlatform,
                     rmiServerPortPlatform, env, csf, ssf,
                     ManagementFactory.getPlatformMBeanServer());
             
@@ -266,7 +266,7 @@ public class JmxRemoteLifecycleListener 
     }
 
     private JMXConnectorServer createServer(String serverName,
-            int theRmiRegistryPort, int theRmiServerPort,
+            String bindAddress, int theRmiRegistryPort, int theRmiServerPort,
             HashMap<String,Object> theEnv, RMIClientSocketFactory csf,
             RMIServerSocketFactory ssf, MBeanServer theMBeanServer) {
         
@@ -280,11 +280,19 @@ public class JmxRemoteLifecycleListener 
             return null;
         }
 
+        if (bindAddress == null) {
+            bindAddress = "localhost";
+        }
+
         // Build the connection string with fixed ports
         StringBuilder url = new StringBuilder();
-        url.append("service:jmx:rmi://localhost:");
+        url.append("service:jmx:rmi://");
+        url.append(bindAddress);
+        url.append(":");
         url.append(theRmiServerPort);
-        url.append("/jndi/rmi://localhost:");
+        url.append("/jndi/rmi://");
+        url.append(bindAddress);
+        url.append(":");
         url.append(theRmiRegistryPort);
         url.append("/jmxrmi");
         JMXServiceURL serviceUrl;

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1564417&r1=1564416&r2=1564417&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Tue Feb  4 18:53:45 2014
@@ -130,6 +130,12 @@
         <bug>56082</bug>: Fix a concurrency bug in JULI&apos;s LogManager
         implementation. (markt)
       </fix>
+      <fix>
+        <bug>56096</bug>: When the attribute <code>rmiBindAddress</code> of the
+        JMX Remote Lifecycle Listener is specified it's value will be used when
+        constructing the address of a JMX API connector server. Patch is
+        provided by Jim Talbut. (violetagg)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Coyote">



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org