Home > Articles > Programming > Java

Managing Complex Software Systems with JMX

Juha Lindfors
  • PrintPrint
  • Share ThisShare This
  • DiscussDiscuss
Close WindowJuha Lindfors

Juha Lindfors

Learn more…

Sorry, this author hasn't posted any blogs.

In this article, Juha Lindfors discusses the JBoss microkernel architecture, and how JMX MBeans are used for dynamically building and configuring a J2EE application server. He also covers some features of the JBossMX architecture - JBoss implementation of JMX technology - that is at the core of the JBoss server.
Juha Lindfors is co-author (with Marc Fleury) of JMX: Managing J2EE with Java Management Extensions (Sams, 2002, ISBN 0-672-32288-9).

The JBoss application server was the first J2EE application server to embrace the Java Management Extensions (JMX) API, more than two years ago. JMX promises to become the solution for managing complex software systems such as J2EE application servers, and is making its way to both J2SE and J2EE platforms in the form of a standard extension. The JMX specification defines instrumentation of services as MBeans, an agent architecture and standard services. The contract for MBeans is simple, easy to implement, and unobtrusive for managed resources, making the adoption of JMX possible also for existing applications. Furthermore, the architecture set in the specification decouples the management clients from the managed resources, increasing the reusability of JMX-based management tools. The JMX specification is protocol-agnostic (and model-agnostic through adaptors), allowing existing management solutions (such as SNMP and WBEM) to integrate with JMX-based solutions.

Indirection and non-typed invocation make the JMX architecture resilient to changing requirements and evolving interfaces. Services constructed as MBeans may register or unregister from the server in accordance with their respective lifecycles, and their interfaces may evolve without having to disconnect the clients. These properties are the cornerstone for the JBoss JMX-based microkernel architecture, which we'll peek at next in this article.

JMX in J2EE

Many of today's popular J2EE application servers include JMX as part of their ever-growing collection of supported APIs. Depending on the application server and the level of commitment to JMX from your chosen vendor, you can achieve various levels of functionality by invoking MBeans residing in the application server. The functionality may range from reading basic configuration values to monitoring the attribute state changes all the way up to configuring and installing individual services of the J2EE platform.

Once the various services of the J2EE platform have been exposed as MBeans, it's possible to build tools that perform customized tasks on the application server. These include simple configuration scripts that you can run remotely, or more sophisticated web- or Swing-based management clients. It's also possible to build generic management tools that access the management attributes and operations of the application server and expose these to the system administrators, deployers, and bean developers.

Figure 1 shows one such generic management tool, an HTML adaptor from Sun's JMX Reference Implementation. It shows a result of listThreadDump management operation on a ServerInfo MBean in JBoss application server. The ServerInfo is an MBean that lists the number and information of threads currently running in the server's JVM. This type of information is often useful for administrators and developers to resolve configuration or performance problems in the server. Using JMX, the thread information is trivially available via a web interface. Note that the code generating the web pages in this case is not in any way specific to the application server in use. The HTML adaptor shown in the figure is a generic management tool that works similarly with any Java object that exposes a management interface.

Figure 1Figure 1 Browser view to thread info in JBoss server.

Similarly, operations to deploy J2EE applications or individual EJBs can be exposed as a management operation. JSR-77, "J2EE Management," defines a common set of management interfaces that all J2EE servers should expose.

  • Share ThisShare This
  • Your Account

Discussions

Make a New Comment

You must log in in order to post a comment.

Related Resources

Danny KalevMinutes from the October 2009 Meeting
By Danny Kalev on November 19, 2009 No Comments

The minutes from the Santa Cruz (October 2009) meeting are available here. Even if you're not a language layer at heart, I encourage you to read them.

Danny KalevA Reader's Opinion on Attributes
By Danny Kalev on October 20, 2009 No Comments

In August I dedicated a series to the debate about C++0x attributes. I believe that it covered the subject in a balanced and detailed way, but I keep getting complaints from C++ users who don't like attributes for various reasons. Here's a recent email I received from a Polish C++ programmer. While it  doesn't represent my opinion about attributes -- I'm rather neutral about this feature and consider it a "solution waiting for a problem" -- but it suggests that attributes are still a highly controversial issue that will haunt C++ for a long time. The email is quoted here with minor edits that and as usual, with all private details removed.

Danny KalevFollowup: The Web 2.0 Guy I Ain't
By Danny Kalev on October 16, 2009 1 Comment

Almost a year ago, I posted here The Web 2.0 Guy I Ain't. People wonder whether I still resist all those Web 2.0 features and technologies at the end of 2009.

See All Related Blogs

Informit Network