Developing Manageable Applications with JMX

     Previous  Next    Open TOC in new window    View as PDF - New Window  Get Adobe Reader - New Window
Content starts here

Introduction and Roadmap

As an application developer, you can greatly reduce the cost of operating and maintaining your applications by building management facilities into your applications. The simplest facility is message logging, which reports events within your applications as they occur and writes messages to a file or other repository. Depending on the criticality of your application, the complexity of the production environment, and the types of monitoring systems your organization uses in its operations center, your needs might be better served by building richer management facilities based on Java Management Extensions (JMX). JMX enables a generic management system to monitor your application; raise notifications when the application needs attention; and change the configuration or runtime state of your application to remedy problems.

This document describes how to use JMX to make your applications manageable.

The following sections describe the contents and organization of this guide—Developing Custom Management Utilities with JMX.


Document Scope and Audience

This document is a resource for software developers who develop management services for Java EE applications. It also contains information that is useful for business analysts and system architects who are evaluating WebLogic Server® or considering the use of JMX for a particular application.

It is assumed that the reader is familiar with Java EE and general application management concepts.

The information in this document is relevant during the design and development phases of a software project. This document does not address production phase administration, monitoring, or performance tuning topics. For links to WebLogic Server documentation and resources related to these topics, see Related Documentation.

This document emphasizes a hands-on approach to developing a limited but useful set of JMX management services. For information on applying JMX to a broader set of management problems, refer to the JMX specification or other documents listed in Related Documentation.


Guide to this Document


Related Documentation

The Sun Developer Network includes a Web site that provides links to books, white papers, and additional information on JMX:

To view the JMX 1.2 specification, download it from

To view the JMX Remote API 1.0 specification, download it from

You can view the API reference for the* packages from:

For guidelines on developing other types of management services for WebLogic Server applications, see the following documents:

For guidelines on developing and tuning WebLogic Server applications, see Developing Applications with WebLogic Server.


Samples for the JMX Developer

In addition to this document, BEA Systems provides two JMX code samples in the Avitek Medical Records Application (MedRec). MedRec is an end-to-end sample Java EE application shipped with WebLogic Server that simulates an independent, centralized medical record management system. The MedRec application provides a framework for patients, doctors, and administrators to manage patient data using a variety of different clients.

The JMX code in MedRec exemplifies the following management tasks:

For information about the JMX code examples in MedRec, do the following:

  1. Start MedRec server.
  2. See Sample Application Examples and Tutorials for BEA WebLogic Server (

  3. When MedRec server starts, it displays its home page in a Web browser. On the MedRec home page, click the More Samples link.
  4. MedRec displays the WebLogic Server Code Examples viewer.

  5. In the Code Examples viewer, in the left pane, do either of the following:
    • Expand Avitek Medical Records Sample Application > Features > JMX. Then select the Monitoring an Application with JMX topic.
    • Expand Avitek Medical Records Sample Application > Features > Security. Then select the Extending a Realm Using JMX topic.


New and Changed JMX Features in This Release

As of release 10.0, WebLogic Server supports the jmx.remote.x.request.waiting.timeout environment parameter. (The JMX Remote API 1.0 specification states that support for this parameter is optional.) Use this parameter to specify the number of milliseconds that your JMX client waits for the invocation of an MBean server method to return. If a method does not return by the end of the timeout period, the client moves to its next set of instructions. By default, a client waits indefinitely for a method to return; if the MBean server is unable to complete an invocation, the JMX client will hang indefinitely.

For more information, see Make Remote Connections to an MBean Server in Developing Custom Management Utilities with JMX.

  Back to Top       Previous  Next