Enterprise application resource management using JMX


Given evolving technologies and the importance of usability, those of us creating the next generation of enterprise applications must identify means of improving application management and monitoring. Learning the art and science of managing and monitoring apps has become an essential skill for software developers and architects. Extensions like Java Management – JMX – shine in this arena.

JMX is a Java technology API that supplies tools for managing and monitoring enterprise resource applications, system objects, hardware, and service-oriented networks. For JMX, a resource is an entity in the system to be monitored and/or controlled by a management application – it can be software or hardware.

For a typical enterprise, resource management means providing tools that report the health of resources and allow users to take action based on those reports; for example, JMX may help IT professionals realize a system’s memory is poorly performing, allowing them to avoid catastrophic failures.

JMX addresses the following monitoring and management needs of an application and its environment:

  1. Monitoring the system health of application and its environment: Understanding the health of your application or web server and hosting database and hardware/OS is important. With JMX, you can wrap any of these resources – Java, non-Java, and hardware – as a manageable resource in the form of a Java object, exposing it to a management application to assess system health and take actions, like notifying IT personal or restarting the system.
  2. Configuring resources in the application: Configurability is key to the adaptability and customizability of your application, and the flexibility of JMX addresses this need. You may want to configure the results displayed in an application UI, as well as the active database connections and number of working threads to improve performance. For example, if your application server is overloaded, you may want to reduce the number threads available to service requests from the outside world. Using JMX, you can do so by directly exposing the API of applications and services to management applications.
  3. Reporting application statistics: In addition to configurability, you may want your application to gather important statistics on database transactions and requests made to your application servers. Using JMX, you can expose related resources to the management application to view reporting application statistics.
  4. Application debugging: At run time, you may want to turn logging verbosity of your application up or down. Using JMX and exposing management APIs, you can turn on debugging and change the logging output level without having to shut it down to make changes.
  5. Monitoring server performance: You can also use JMX to gauge server load, ensuring you avoid server failure. With JMX, you can easily monitor a system for critical events. When an event is noticed, JMX can deliver notifications through a customizable listener process.

For additional documentation on JMX capabilities, architecture, and features, please see: