Sun Java System Application Server Enterprise Edition 8.2 Administration Guide

Using JConsole

This section contains the following topics:

Administration (management and monitoring) of the Application Server is based on JMX. This means that the managed components are represented as MBeans. With Java 2 Standard Edition (J2SE) 5.0, you can monitor the JVM and view the JVM MBeans to understand what is going on there. To expose this instrumentation, Application Server provides a configuration of Standard JMX Connector Server called System JMX Connector Server. When the Application Server starts up, an instance of this JMX Connector Server starts up, exposing the instrumentation to trusted clients.

The Java Monitoring and Management Console (JConsole) is a popular JMX Connector that can manage a JMX backend. JConsole (http://java.sun.com/j2se/1.5.0/docs/tooldocs/share/jconsole.html) is available as part of the standard JDK distribution beginning with J2SE 5.0. For more information on JConsole, see http://java.sun.com/developer/technicalArticles/J2SE/jconsole.html

When you configure JConsole with Application Server, the Application Server becomes the JMX Connector's server-end and JConsole becomes the JMX Connector's preferred client-end.

Securing JConsole to Application Server Connection

There are subtle differences in how to connect to Application Server, or any JMX Connector Server end based on the transport layer security of the connection. If the server end is secure (guarantees transport layer security), there is a little more configuration to be performed on the client end.

When you install a Platform Edition domain on a machine such as appserver.sun.com, you will see the following in the DAS's (Domain Administration Server, the admin server or simply the domain) domain.xml:

<!- – The JSR 160 "system-jmx-connector" – –><jmx-connector accept-all="false" address="0.0.0.0" auth-realm-name="admin-realm" enabled="true" name="system" port="8686" protocol="rmi_jrmp" security-enabled="false"/><!- – The JSR 160 "system-jmx-connector" – –>

The security-enabled flag for the JMX Connector is false. If you are running the Enterprise Edition, or if you have turned on security for the JMX Connector in the Platform Edition, this flag is set to true.

<!- – The JSR 160 "system-jmx-connector" – –><jmx-connector accept-all="false" address="0.0.0.0" auth-realm-name="admin-realm" enabled="true" name="system" port="8686" protocol="rmi_jrmp" security-enabled="true"/>...</jmx-connector><!- – The JSR 160 "system-jmx-connector" – –>

Prerequisites for Connecting JConsole to Application Server

The JConsole setup has two parts: a server end and a client end. The Application Server domain is installed on a machine called appserver.sun.com, which is a powerful Solaris server. This is the server end.

The client end also has an installation of Application Server. Let us assume that the client end is a Windows machine with Java SE 5.0 and Application Server installed.


Note –

The Application Server installation is needed on the client end only when your Application Server domain has security enabled on the remote machine (the default for Enterprise Edition). If you just want to administer an Application Server Platform Edition domain on the Solaris machine above, you do not need the Application Server installation on this client machine.


If the server and client ends are on the same machine, you can use localhost to specify the host name.

Connecting JConsole to the Application Server

This section describes connecting JConsole to Application Server without security enabled on the JMX Connector. By default, security is not enabled on Application Server Platform Edition.

  1. Start the domain on appserver.sun.com.

  2. Start JConsole by running JDK_HOME/bin/jconsole

  3. In the Connect to Agent tab of JConsole, enter user name, password, host name and port (8686, by default).

    The user name refers to the admin user name and password refers to the admin password of the domain.

  4. Click Connect.

    In the JConsole window you will see all your MBeans, VM information etc., in various tabs.

Connecting JConsole Securely to Application Server

This section describes how to connect JConsole to Application Server with security enabled on the JMX Connector. By default, security is enabled on Application Server Enterprise Edition. Use this procedure if you have security enabled on the Platform Edition's JMX Connector.

  1. Install Application Server on the client machine (where JConsole is installed).

    The only reason you need this is to let JConsole know where the server certificate of the Domain Administration Server that you trust is located. To obtain that certificate, invoke at least one remote asadmin command and to do that, you need the local installation of Application Server.

  2. Start the Application Server Enterprise Edition on appserver.sun.com.

    Since this is an Enterprise Edition domain, the system JMX Connector server is secure.

  3. From the local Application Server installation, run install-dir/bin/asadmin list --user admin --secure=true --host appserver.sun.com --port 4849 (where 4849 is the server's admin port).

    Though asadmin list command is chosen for this example, you can run any remote asadmin command. You will now be prompted to accept the certificate sent by the DAS of appserver.sun.com.

  4. Press y to accept the certificate sent by the Domain Administration Server on appserver.sun.com.

    The server's certificate is stored in a file called .asadmintruststore in your home directory on the client machine.


    Note –

    This step is not required if your server machine and client machine is the same. That is, if you are running JConsole also on appserver.sun.com.


  5. Let JConsole know the DAS's trust store location by using the following JConsole command:

    JDK-dir/bin/jconsole.exe -J-Djavax.net.ssl.trustStore="C:/Documents and Settings/user/.asadmintruststore"

    This certificate is now automatically trusted by JConsole.

  6. Start JConsole by running JDK_HOME/bin/jconsole

  7. In the Connect to Agent tab of JConsole, enter user name, password, host name and port (8686, by default).

    The user name refers to the admin user name and password refers to the admin password of the domain.

  8. Click Connect.

    In the JConsole window you will see all your MBeans, VM information etc., in various tabs.