To serve clients who need a standard programmatic means to monitor and access the broker, Message Queue also supports the Java Management Extensions (JMX) architecture, which allows a client application to manage resources programmatically.
Resources can include applications, services, or devices. In the case of Message Queue, resources include everything that you can manipulate using imqcmd: the broker, services, connections, destinations, consumers, producers, and so on.
Management includes the ability to dynamically configure and monitor resources, and the ability to obtain notifications about state changes and error conditions.
JMX-based administration provides dynamic, fine grained, programmatic access to the broker. You can use this kind of administration in a number of ways.
You can include JMX code in your JMS client application to monitor application performance and, based on the results, to reconfigure the JMS objects you use to improve performance.
You can write JMX clients that monitor the broker to identify use patterns and performance problems, and you can use the JMX API to reconfigure the broker to optimize performance.
You can write a JMX client to automate regular maintenance tasks, rolling upgrades, and so on.
You can write a JMX application that constitutes your own version of imqcmd, and you can use it instead of imqcmd.
In addition to offering expanded functionality (compared to the JMS API), JMX is also the Java standard for building management applications and is widely used for managing J2EE infrastructure. If your Message Queue client is a part of a larger J2EE deployment, JMX support allows you to use a standard programmatic management framework throughout your J2EE application.
The JMX specification defines an architecture that enables the programmatic management of any distributed resource. This architecture is defined by design patterns, APIs, and various services. Message Queue relies on the implementation of the JMX 1.2 specification, which is part of JDK 1.5.
To manage a Message Queue broker using this architecture, you create an MBean (a managed Java object) that represents the resource to be managed. You manage the underlying resource by configuring the MBean, invoking its operations, or listening for notifications. For complete information about using JMX to manage the Message Queue broker, see Sun Java System Message Queue 4.1 Developer’s Guide for JMX Clients.