The files listed below are code examples demonstrating some of the main features of JMX technology. You can use these examples to develop more complex MBeans and full-featured JMX agents to fit your management solution.
Each example consists of Java source files and a README file. The README file explains the topics covered by the example and instructions for compiling and running the classes.
You can also download a Zip file of all the JMX technology examples. For more complete descriptions of how to run the examples, see the JMX Technology Tutorial.
Note - In addition to the examples presented here, you can download the Java SE Demos and Samples bundle. Once you have unzipped the bundle, a sample application that demonstrates a real-life implementation of the JMX API can be found in the following directory:
JDK_HOME/sample/jmx/jmx-scandir
The jmx-scandir
example is an advanced example, which
presents advanced concepts of the JMX API in a real-world
scenario.
The following JMX technology examples are provided in the examples ZIP file:
JMX Essentials
This example introduces the fundamental notion of the JMX API, namely managed beans, or MBeans.
View the README file or the source code for the Java classes used:
JMX MBean Notifications
This example implements MBean notifications.
View the README file or the source code for the Java classes used:
MXBeans
This example demonstrates the use of MXBeans.
View the README file or the source code for the Java classes used:
MBean Descriptors
This example demonstrates the use of MBean Descriptors.
View the README file or the source code for the Java classes used:
JMX Connectors
This example provides a sample implementation of how to connect to MBeans and perform operations on them remotely.
View the README file or the source code for the Java classes used:
Lookup Services
The JMX API defines three bindings to lookup services, using existing lookup technologies These examples provide a sample implementation of each type of lookup service.
Security
The JMX API implements existing security protocols to secure your connections.
These examples provide a sample secure implementations