Chapter 13. Managing Spring beans with JMX

 

This chapter covers

  • Exposing Spring beans as managed beans
  • Remotely managing Spring beans
  • Handling JMX notifications

Spring’s support for DI is a great way to configure bean properties in an application. But once the application has been deployed and is running, DI alone can’t do much to help you change that configuration. Suppose that you want to dig into a running application and change its configuration on the fly. That’s where Java Management Extensions (JMX) comes in.

JMX is a technology that enables you to instrument applications for management, monitoring, and configuration. Originally available as a separate extension to Java, JMX is now a standard part of the Java 5 distribution.

The key component of an application that’s instrumented for management with JMX is the MBean (managed bean). An MBean is a JavaBean that exposes certain methods which define the management interface. The JMX specification defines four types of MBeans:

13.1. Exporting Spring beans as MBeans

13.2. Remoting MBeans

13.3. Handling notifications

13.4. Summary