|
Page Edited :
MINA :
JMX Integration
JMX Integration has been edited by Ashish Paliwal (Mar 02, 2009). Change summary: Updated for 2.0 M4 Java Management Extensions (JMX) is used for managing and monitoring java applications. This tutorial will provide you with an example as to how you can JMX-enable your MINA based application. This tutorial is designed to help you get the JMX technology integrated in to your MINA-based application. In this tutorial, we will integrate the MINA-JMX classes into the imagine server example program.
Adding JMX SupportTo JMX enable MINA application we have to perform following
We shall follow \src\main\java\org\apache\mina\example\imagine\step3\server\ImageServer.java, for the rest of our discussion Create/Get MBean server// create a JMX MBean Server server instance
MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer();
This lines get the MBean Server instance.
If you are using Java 5 or earlier: java -Dcom.sun.management.jmxremote -classpath <CLASSPATH> org.apache.mina.example.imagine.step3.server.ImageServer If you are using Java 6: java -classpath <CLASSPATH> }}{{{}org.apache.mina.example.imagine.step3.server.ImageServer Start JConsoleStart JConsole using the following command: <JDK_HOME>/bin/jconsole We can see the different attributes and operations that are exposed by the MBeans |
Unsubscribe or edit your notifications preferences
