Thursday, November 03, 2005

Using jManage 1.0 to connect to JDK 1.5

JDK1.5 exposes mangement information via a set of MBean registered in the platform MBeanServer. jManage can be used to manage and monitor a JDK 1.5 application.

To enable a JDK 1.5 application for remote monitoring, add the following system properties to your JDK1.5 application:

-Dcom.sun.management.jmxremote.port=9999
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false

Add this application in jManage as a JSR160 application with the following URL:

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

You will see that you can monitor and manage ClassLoading, Memory, Threads, etc. You can even change the log level of your application, if your application uses JDK logging API.

Note that it is important to enable authentication for your production JDK1.5 application. To enable authentication and access control, please read this.

No comments: