Jump to: navigation, search

Difference between revisions of "Jetty/Feature/JMX"

< Jetty‎ | Feature
(One intermediate revision by one other user not shown)
Line 11: Line 11:
  
 
| body =  
 
| body =  
Jetty JMX integration can be configured via etc/jetty-jmx.xml configuration file. See [[Jetty/Tutorial/JMX|Jetty JMX tutorial]] for instructions on how to configure Jetty JMX integration.
+
Jetty JMX integration can be configured using etc/jetty-jmx.xml configuration file. See [[Jetty/Tutorial/JMX|Jetty JMX tutorial]] for instructions on how to configure Jetty JMX integration.
  
 
In order to monitor an application using JMX, the following steps have to be performed:
 
In order to monitor an application using JMX, the following steps have to be performed:
Line 25: Line 25:
 
   
 
   
 
| more =
 
| more =
See [[Jetty/Tutorial/JMX|Jetty JMX tutorial]] for instructions on how to configure Jetty JMX integration.
+
* See [[Jetty/Tutorial/JMX|Jetty JMX tutorial]] for instructions on how to configure Jetty JMX integration.
 +
* The [http://code.google.com/p/jminix/ JMiniX] web consoles for JMX beans.
 
| categories = [[Category:Jetty Feature]]
 
| categories = [[Category:Jetty Feature]]
 
}}
 
}}

Revision as of 03:11, 7 June 2012



Introduction

Java Management Extensions (JMX) API is a standard API for management and monitoring of resources such as applications, devices, services, and the Java virtual machine. The JMX technology was developed through the Java Community Process.

Typical uses of the JMX technology include:

  • Consulting and changing application configuration.
  • Accumulating statistics about application behavior and making them available.
  • Notifying of state changes and erroneous conditions.

The JMX API includes remote access, so a remote management program can interact with a running application for these purposes.

Feature

Jetty JMX integration can be configured using etc/jetty-jmx.xml configuration file. See Jetty JMX tutorial for instructions on how to configure Jetty JMX integration.

In order to monitor an application using JMX, the following steps have to be performed:

  1. Application should instantiate an MBean container.
  2. Objects have to be instrumented to be MBeans.
  3. MBeans need to be accessed by JMX agents.

Jetty JMX integration uses platform MBean server implementation provided by Java VM. The integration is based on the ObjectMBean implementation of DynamicMBean. This implementation allows an arbitrary POJO to be wrapped in an MBean and for meta data to be provided by properties files.

The creation of MBeans is coordinated by the MBeanContainer implementation of the Container.Listener interface. The Jetty Server and it's components use a Container to maintain a containment tree of components and to support notification of changes to that tree. The MBeanContainer class listens for Container events and creates and destroys MBeans as required to wrap all Jetty components.

MBeans published by Jetty can be accessed both through built-in Java VM connector via JConsole, or by registering a remote JMX connector and using a remote JMX agent to monitor Jetty.

Additional Resources

  • See Jetty JMX tutorial for instructions on how to configure Jetty JMX integration.
  • The JMiniX web consoles for JMX beans.