JavaTM Management Extensions (JMXTM) scandir Example

Introduction

Generating the Java Documentation

Overview of the scandir Example

API Documentation and Sources

Patterns, Best Practices, and Common Pitfalls

MBeans or MXBeans?

MBean Names - aka ObjectNames

Inter MBean Navigation

The MBeanRegistration interface, or how an MBean can know or provide its own name

The Singleton MBean Pattern

Managing the Life Cycle of dependent MBeans

Emitting Notifications

Extending NotificationBroadcasterSupport

The Delegation Pattern: delegating to a NotificationBroadcasterSupport delegate

Implementing NotificationEmitter from scratch

Beware of Synchronization Locks

Don't subclass Notification

Configuration MBeans

MBeans Must Be Thread-Safe

Waiting for Notifications

Holding hard references to other MBeans: proxy or direct reference?

Agent Class

Secure Client Class

Testing the scandir Example

Running the scandir Example

Playing with JConsole

Turning the example into a Secure JMX Application

Configuring the JVM Agent for Secure Remote Connection

Creating a password and access file

Keystore and Truststore

Starting a Secure scandir agent

Connecting to the Secure JMX Application

Using jconsole to connect to the secure agent

Writing a programmatic client to connect to the secure agent

Conclusion

References

  1. JMX Best Practices: This document describes best practices that have been identified for modeling using the JMX API.
  2. Monitoring and Management Using JMX: How to enable, configure, and connect to the JVM JMX agent.
  3. Using JConsole: JConsole is a JMX-Compliant monitoring tool which allows you to interact graphically with your own MBeans.
  4. Monitoring and Management for the Java Platform: The Java Platform Standard Edition (Java SE) 6 provides comprehensive monitoring and management support for the Java platform.
  5. List of JMX-related Blogs: This page provides links to the different web logs written by members of the Sun team working on the JMX API.
  6. JavaTM Secure Socket Extension (JSSE) Reference Guide: comprehensive documentation about the JavaTM Secure Socket Extension (JSSE)
  7. Java SE 6 Documentation Index: This document covers the JavaTM Platform, Standard Edition 6 JDK.