Subject ID

Tomcat-JMX

Subject

Enhancing JMX descriptors in Apache Tomcat

Author

Budddhika Chamith De Alwis

Email

chamibuddhikaATgmail.com, buddhika_chamithATyahoo.com

Project Title

Enhancing JMX descriptors in Apache Tomcat

Synopsis

JMX is a technology which can be used to manage and monitor Java applications. A proper JMX support can significantly ease the task of remotely configuring, managing, and monitoring a Java application. For an application to be manageable via JMX, it has to be instrumented by providing it with JMX objects called MBeans which are then used to manage classes within the application.

Apache Tomcat is JMX aware and this JMX support can be leveraged to provide a management interface for configuring and monitoring a Tomcat instance to a certain extent. Tomcat utilizes a JMX implementation similar to Apache Commons Modeler. Tomcat mainly uses Dynamic MBean variant and utilize the features of modeler to make easier for developing Dynamic MBeans by allowing required meta-data to be configured from an XML description (mbeans-descriptors.xml) of each MBean to be supported.

Even though required JMX infrastructure is present in Tomcat some lapses (some of them described in section Project Details) currently present in the infrastructure and APIs which this project is aimed at addressing, makes it hard to utilize it to fully configure and manage a remote Tomcat instance from the scratch. Such complete JMX infrastructure would be beneficial for any endeavor which is aimed at providing a remote management application for Tomcat. (It seems that there is some interest towards this end at present. See [1] )

Project Description

Tomcat has a JMX implementation which closely resembles commons modeler.[2] DynamicMBeans and its extensions are basically used in the JMX implementation. A central Registry is used to read Mbean related meta-data and register the MBeans with the MBeans server. MbeanFactory provides facility to remotely generate some of the internal server components along side with their associated MBeans.

The aim of this project is enable a complete Tomcat instance to be remotely configured with least possible up front configurations. Some lapses regarding this front has been currently identified which this project would aim to address.

  1. Currently there is no support for remotely generating MBeans associated with Service components within the server. This facility is required to be added to the MbeanFactory along with other related functions.

  2. Some JMX getters/setters not aligned with changes to underlying objects. Some mbeans-descriptor.xml files contain operations which underlying object doesn't expose due some mismatching changes to APIs and descriptor files. (e.g: MbeansFactory descriptors contains methods non existent in actual class).

  3. Attributes exposed as read/write that should be read-only or need more work to make write operations safe. (e.g: Care must be taken to associate exactly one Engine component with a Service component)
  4. Providing MBean generation options for any new but required resources hitherto not supported.
  5. Making methods used in remote configurations more friendly towards to that end. (e.g: Parameterize file path related parameters with URLs as permitted)

Deliverables

  1. Updated JMX descriptors which accurately reflect underlying objects.
  2. Added functionality required to enable a complete Tomcat instance to be configured entirely via JMX.
  3. Related documentation as required.

Project Schedule

April 20th to May 23th

Getting familiarized with Tomcat in general and discuss and identifying areas that need to be changed. An overall idea about Tomcat internal components and their relationships will be required to understand how to fully configure a Tomcat instance with respect to its component functionalities. Coming up with a to do list of changes along with their scheduled completion times, will be done during this period also leaving room for any possible additions later on as well.

May 23th to July 12th

Adding missing functionalities in MBean generation codes. JMX API and descriptor enhancements.

June 12 th to July 31st

JMX API and descriptor enhancements.

July 31 st to August 16 th

Fixing any bugs identified, reviewing codes and providing required documentation.

Biography

I am a fourth year student of Computer Science and Engineering Department of University of Moratuwa, . I have been working with open source technologies for the last couple of years and I am familiar with Apache Axis2 and ODE projects. I participated and successfully completed GSOC 2009 in Apache ODE project [3]. For last several weeks I have been familiarizing myself with the Apache Tomcat project. So far I was also able to contribute to the Apache Tomcat project by providing an enhancement [4] and an initial patch regarding the first issue mentioned in the project details section. [5]

Apart from web service technologies I have worked with other technologies such as JSP/Servlets, JSF, Hibernate, and Jasper reporting and have developed several applications including an e-commerce web application and gaming application. I am passionate about open source software development and hope to continue with it in the future.

References

[1] Console for Tomcat
[2] Commons Modeler
[3] Apache ODE integration in BPELUnit
[4] Enhancement - AJPClient
[5] JMX Enhancement