|
| Topics this page: |
|
JMX exposes JVM Garbage Collection and other metrics from JConsole or as a remote JMX client.
JMX can also be used by programmers to signal application-specific counts and timings such as how long back-end database requests took to process.
Sun's Reference implementation of JMX is the most "authoritative".
Other reference implementations are more complete:
Message MBeans differ in the way they expose the management interface of the application resource to the agent.
lib/jmxri.jar (JMX reference implementation Java class package) and
lib/jmxtools.jar (JMX toolkit)
should be added to the Java SDK 2 OS CLASSPATH environment variable.
Package | Class | Description |
---|---|---|
javax.management | Core classes | |
javax.management.loading | - | |
javax.management.monitor | listener mechanism for receiving its notifications | |
javax.management.timer | - | |
javax.management.relation | handles relations, relation types and to perform queries to retrieve relations. | |
javax.management.modelmbean | - | |
javax.management.openmbean | - | |
javax.management.mbeanserver | ? | |
javax.management.notification | ? | |
javax.management.mlet | ? | |
com.sun.jmx.* | - | |
com.sun.management.jmx | - | |
com.sun.jdmk.* | - |
Instructions for compiling and running MBeanServer on Windows:
@REM Run from within the examples folder: mkdir tutorial @REM Compile the BaseAgent class in this new directory with all the example classes: copy BaseAgent/BaseAgent.java tutorial copy MonitorMBean/Simple.java tutorial copy MonitorMBean/SimpleMBean.java tutorial copy DynamicMBean/SimpleDynamic.java tutorial cd tutorial dir tutorial javac *.java cd .. java tutorial/BaseAgent pause
Closing the window shuts down the service.
Seeing "Adaptor:name=html,port=8082" means you can get the Agent View at http://localhost:8082/
Click the "Admin" button for the Agent Admin view.
Creating and registering a standard MBean involves:
|
| ||
|
| Your first name: Your family name: Your location (city, country): Your Email address: |
Top of Page
Thank you!
Human verify: |