org.apache.catalina.mbeans

Class JmxRemoteLifecycleListener

public class JmxRemoteLifecycleListener extends Object implements LifecycleListener

This listener fixes the port used by JMX/RMI Server making things much simpler if you need to connect jconsole or similar to a remote Tomcat instance that is running behind a firewall. Only the ports are configured via the listener. The remainder of the configuration is via the standard system properties for configuring JMX.
Nested Class Summary
static classJmxRemoteLifecycleListener.RmiClientLocalhostSocketFactory
Field Summary
protected StringaccessFile
protected booleanauthenticate
protected String[]ciphers
protected booleanclientAuth
protected JMXConnectorServercsPlatform
protected StringpasswordFile
protected String[]protocols
protected intrmiRegistryPortPlatform
protected intrmiServerPortPlatform
protected booleanrmiSSL
protected static StringManagersm
The string resources for this package.
protected booleanuseLocalPorts
Method Summary
intgetRmiRegistryPortPlatform()
Get the port on which the Platform RMI registry is exported.
intgetRmiServerPortPlatform()
Get the port on which the Platform RMI server is exported.
booleangetUseLocalPorts()
Get the flag that indicates that local ports should be used for all connections.
voidlifecycleEvent(LifecycleEvent event)
voidsetRmiRegistryPortPlatform(int theRmiRegistryPortPlatform)
Set the port on which the Platform RMI registry is exported.
voidsetRmiServerPortPlatform(int theRmiServerPortPlatform)
Set the port on which the Platform RMI server is exported.
voidsetUseLocalPorts(boolean useLocalPorts)
Set the flag that indicates that local ports should be used for all connections.

Field Detail

accessFile

protected String accessFile

authenticate

protected boolean authenticate

ciphers

protected String[] ciphers

clientAuth

protected boolean clientAuth

csPlatform

protected JMXConnectorServer csPlatform

passwordFile

protected String passwordFile

protocols

protected String[] protocols

rmiRegistryPortPlatform

protected int rmiRegistryPortPlatform

rmiServerPortPlatform

protected int rmiServerPortPlatform

rmiSSL

protected boolean rmiSSL

sm

protected static final StringManager sm
The string resources for this package.

useLocalPorts

protected boolean useLocalPorts

Method Detail

getRmiRegistryPortPlatform

public int getRmiRegistryPortPlatform()
Get the port on which the Platform RMI registry is exported.

UNKNOWN: The port number

getRmiServerPortPlatform

public int getRmiServerPortPlatform()
Get the port on which the Platform RMI server is exported. This is the port that is normally chosen by the RMI stack.

UNKNOWN: The port number

getUseLocalPorts

public boolean getUseLocalPorts()
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.

UNKNOWN: true if local ports should be used

lifecycleEvent

public void lifecycleEvent(LifecycleEvent event)

setRmiRegistryPortPlatform

public void setRmiRegistryPortPlatform(int theRmiRegistryPortPlatform)
Set the port on which the Platform RMI registry is exported.

Parameters: theRmiRegistryPortPlatform The port number

setRmiServerPortPlatform

public void setRmiServerPortPlatform(int theRmiServerPortPlatform)
Set the port on which the Platform RMI server is exported. This is the port that is normally chosen by the RMI stack.

Parameters: theRmiServerPortPlatform The port number

setUseLocalPorts

public void setUseLocalPorts(boolean useLocalPorts)
Set 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.

Parameters: useLocalPorts Set to true if local ports should be used

Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.