Sun GlassFish Enterprise Server v3 Prelude Administration Guide

Connecting JConsole to Enterprise Server

Java SE 5 enhances management and monitoring of the virtual machine by including a Platform MBean Server and by including managed beans (MBeans) to configure the virtual machine.

To view all MBeans, Enterprise Server provides a configuration of the standard JMX connector server called System JMX Connector Server. As part of Enterprise Server startup, an instance of this JMX Connector Server is started. Any compliant JMX Connector Client can connect to the server using the JMX Connector Server.

Java SE also provides tools to connect to an MBean Server and view the MBeans registered with the server. JConsole is one such popular JMX Connector Client and is available as part of the standard Java SE distribution. By default, Enterprise Server is configured with a non-secure System JMX Connector Server and cannot be enabled for v3 Prelude. If this is an issue, jms-connector can be removed.

When you configure JConsole for use with Enterprise Server, Enterprise Server becomes the JMX Connector's server end and JConsole becomes the JMX Connector's client end.

ProcedureTo Set Up JConsole Connectivity

This procedure describes how to connect JConsole to Enterprise Server. Security is not enabled on the JMX Connector.

  1. Start the domain.

    For instructions, see To Start a Domain (or Server).

  2. Start JConsole using this format: JDK_HOME/bin/jconsole

    For example:


    /usr/java/bin/jconsole
    

    The JConsole Connect to Agent window is displayed.

  3. Click the Remote tab and type the host name and port.

  4. Click Connect.

  5. In the Remote Process text box, specify the JMX Service URL.

    For example:


    service:jmx:rmi:///jndi/rmi://localhost:8686/jmxrmi 
    

    Note –

    Another host name can be substituted for localhost. The default port number (8686) could change if the jmx-connector configuration has been modified.


  6. Click Connect.

    In the JConsole window you will see all your MBeans, JVM information, and so on, in various tabs.

  7. Browse Sun GlassFish v3 Prelude MBeans along with Platform MBeans.

    Use either the Remote tab or the Advanced tab to connect to the Enterprise Server.

    Remote tab

    Specify the user name, password, administration server host, and JMS port number (8686 by default), and then select Connect.

    Advanced tab

    Specify the JMXServiceURL as service: jmx:rmi:///jndi/rmi://host:jms-port/jmxrmi, and then select Connect. The JMXServerURL is printed in the server.log file and is displayed in the command window of the domain creation command.

See Also

For more information on JConsole, see http://java.sun.com/javase/6/docs/technotes/guides/management/jconsole.html.