Chapter 20. 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 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 managed bean (MBean). An MBean is a JavaBean that exposes certain methods that define the management interface. The JMX specification defines four types of MBeans: