From 98951d04cc137902613735c96086d8d123c00292 Mon Sep 17 00:00:00 2001
From: markt
Date: Sun, 8 Mar 2009 18:46:51 +0000
Subject: [PATCH] Tomcat uses Platform MBean server. Adjust listener
accordingly.
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@751496 13f79535-47bb-0310-9956-ffa450edef68
---
.../mbeans/JmxRemoteLifecycleListener.java | 42 ----------------------
webapps/docs/config/listeners.xml | 24 ++++---------
2 files changed, 6 insertions(+), 60 deletions(-)
diff --git a/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java b/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java
index ebc8fbfa0..6f2e3dd26 100644
--- a/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java
+++ b/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java
@@ -67,8 +67,6 @@ public class JmxRemoteLifecycleListener implements LifecycleListener {
protected int rmiRegistryPortPlatform = -1;
protected int rmiServerPortPlatform = -1;
- protected int rmiRegistryPortCatalina = -1;
- protected int rmiServerPortCatalina = -1;
protected boolean rmiSSL = true;
protected String ciphers[] = null;
protected String protocols[] = null;
@@ -79,7 +77,6 @@ public class JmxRemoteLifecycleListener implements LifecycleListener {
protected boolean useLocalPorts = false;
protected JMXConnectorServer csPlatform = null;
- protected JMXConnectorServer csCatalina = null;
/**
* Get the port on which the Platform RMI server is exported. This is the
@@ -116,40 +113,6 @@ public class JmxRemoteLifecycleListener implements LifecycleListener {
}
/**
- * Get the port on which the Catalina RMI server is exported. This is the
- * port that is normally chosen by the RMI stack.
- * @returns The port number
- */
- public int getRmiServerPortCatalina() {
- return rmiServerPortCatalina;
- }
-
- /**
- * Set the port on which the Catalina RMI server is exported. This is the
- * port that is normally chosen by the RMI stack.
- * @param theRmiServerPortCatalina The port number
- */
- public void setRmiServerPortCatalina(int theRmiServerPortCatalina) {
- rmiServerPortCatalina = theRmiServerPortCatalina;
- }
-
- /**
- * Get the port on which the Catalina RMI registry is exported.
- * @returns The port number
- */
- public int getRmiRegistryPortCatalina() {
- return rmiRegistryPortCatalina;
- }
-
- /**
- * Set the port on which the Catalina RMI registry is exported.
- * @param theRmiRegistryPortCatalina The port number
- */
- public void setRmiRegistryPortCatalina(int theRmiRegistryPortCatalina) {
- rmiRegistryPortCatalina = theRmiRegistryPortCatalina;
- }
-
- /**
* Get the flag that indicates that local ports should be used for all
* connections. If using SSH tunnels, or similar, this should be set to
* true to ensure the RMI client uses the tunnel.
@@ -257,13 +220,8 @@ public class JmxRemoteLifecycleListener implements LifecycleListener {
rmiServerPortPlatform, env,
ManagementFactory.getPlatformMBeanServer());
- // Create the catalina server
- csCatalina = createServer("Catalina", rmiRegistryPortCatalina,
- rmiServerPortCatalina, env,
- MBeanUtils.createServer());
} else if (Lifecycle.STOP_EVENT == event.getType()) {
destroyServer("Platform", csPlatform);
- destroyServer("Catalina", csCatalina);
}
}
diff --git a/webapps/docs/config/listeners.xml b/webapps/docs/config/listeners.xml
index ffa0eb89a..f9aaae299 100644
--- a/webapps/docs/config/listeners.xml
+++ b/webapps/docs/config/listeners.xml
@@ -142,10 +142,10 @@
in $CATALINA_HOME/lib. This jar may be found in the extras
directory of the binary download area.
-
The JMX Remote Lifecycle Listener fixes the port used by
+
The JMX Remote Lifecycle Listener fixes the ports used by
the JMX/RMI Server making things much simpler if you need to connect
jconsole or a similar tool to a remote Tomcat instance that is running
- behind a firewall. Only this port is configured via the listener. The
+ behind a firewall. Only these ports are configured via the listener. The
remainder of the configuration is via the standard system properties for
configuring JMX. For further information on configuring JMX see
@@ -155,8 +155,7 @@
This listener must only be nested within a Server
+ element.
The following additional attributes are support by the JMX Remote
Lifecycle Listener:
@@ -190,17 +189,6 @@
The port to be used by the Platform JMX/RMI server.
-
-
The port to be used by the JMX/RMI registry for the Catalina MBeans.
- The replaces the use of the
- com.sun.management.jmxremote.port system property that
- should not be set when using this valve.
-
-
-
-
The port to be used by the Catalina JMX/RMI server.
-
-
Should any clients using these ports be forced to use local ports to
connect to the the JMX/RMI server. This is useful when tunnelling
--
2.11.0