Author: markt Date: Sun Mar 8 18:46:51 2009 New Revision: 751496 URL: http://svn.apache.org/viewvc?rev=751496&view=rev Log: Tomcat uses Platform MBean server. Adjust listener accordingly.
Modified: tomcat/trunk/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java tomcat/trunk/webapps/docs/config/listeners.xml Modified: tomcat/trunk/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java?rev=751496&r1=751495&r2=751496&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java (original) +++ tomcat/trunk/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java Sun Mar 8 18:46:51 2009 @@ -67,8 +67,6 @@ 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 @@ 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 @@ } /** - * 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 @@ 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); } } Modified: tomcat/trunk/webapps/docs/config/listeners.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/listeners.xml?rev=751496&r1=751495&r2=751496&view=diff ============================================================================== --- tomcat/trunk/webapps/docs/config/listeners.xml (original) +++ tomcat/trunk/webapps/docs/config/listeners.xml Sun Mar 8 18:46:51 2009 @@ -142,10 +142,10 @@ in <code>$CATALINA_HOME/lib</code>. This jar may be found in the extras directory of the binary download area.</p> - <p>The <strong>JMX Remote Lifecycle Listener</strong> fixes the port used by + <p>The <strong>JMX Remote Lifecycle Listener</strong> 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 <a href="http://java.sun.com/j2se/1.6.0/docs/guide/management/agent.html";> @@ -155,8 +155,7 @@ <p>If this listener was configured in server.xml as: <source> <Listener className="org.apache.catalina.mbeans.JmxRemoteLifecycleListener" - rmiRegistryPortPlatform="10001" rmiServerPortPlatform="10002" - rmiRegistryPortCatalina="10003" rmiServerPortCatalina="10004" /> + rmiRegistryPortPlatform="10001" rmiServerPortPlatform="10002" /> </source> with the following system properties set (eg in setenv.sh): <source> @@ -168,11 +167,11 @@ behind a firewall. </p> - <p><strong>JMX access should be considered equivalent to administartive + <p><strong>JMX access should be considered equivalent to administrative access and secured accordingly.</strong></p> - <p>This listener must only be nested within <a href="server.html">Server</a> - elements.</p> + <p>This listener must only be nested within a <a href="server.html">Server</a> + element.</p> <p>The following additional attributes are support by the <strong>JMX Remote Lifecycle Listener</strong>:</p> @@ -190,17 +189,6 @@ <p>The port to be used by the Platform JMX/RMI server.</p> </attribute> - <attribute name="rmiRegsitryPortCatalina" required="true"> - <p>The port to be used by the JMX/RMI registry for the Catalina MBeans. - The replaces the use of the - <code>com.sun.management.jmxremote.port</code> system property that - should not be set when using this valve.</p> - </attribute> - - <attribute name="rmiServerPortCatalina" required="true"> - <p>The port to be used by the Catalina JMX/RMI server.</p> - </attribute> - <attribute name="useLocalPorts" required="false"> <p>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 --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org