Jetty has moved!
Jetty is a project at the Eclipse Foundation.
Homepage:http://www.eclipse.org/jetty
Downloads: http://download.eclipse.org/jetty/
Documentation:http://www.eclipse.org/jetty/documentation/current/
About:http://www.eclipse.org/jetty/about.php
Jetty Powered:http://www.eclipse.org/jetty/powered/
Contact the core Jetty developers at www.webtide.com
private support for your internal/customer projects ... custom extensions and distributions ... versioned snapshots for indefinite support ... scalability guidance for your apps and Ajax/Comet projects ... development services from 1 day to full product delivery
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

Jetty JMX Integration

The jetty JMX 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.

Using Jetty MBeans

The simplest way to use Jetty MBeans is to use the JVM supplied jconsole utility. If you use mx4j, then an internal HTTP agent can also be used (see jetty-jmx.xml config file comments).

See Running jetty with jconsole for instructions on how to configure jmx for use with Sun's jconsole.

Jetty Standalone

The MBeanContainer instance can be configured for a Jetty server by the jetty-jmx.xml configuration file. This can be run with the standard configuration file as follows:

Icon

Jetty 7 requires -DOPTIONS=jmx to be used when starting up Jetty. That is, instead of the above, use this:
java -DOPTIONS=jmx -jar start.jar etc/jetty-jmx.xml etc/jetty.xml

Jetty Maven Plugin

If you are using the jetty maven plugin you should copy the etc/jetty-jmx.xml file into your webapp project somewhere, such as src/etc, then add a <jettyConfig> element to the plugin <configuration>:

Running on Java 1.4 and below (with MX4J)

To run on Java 1.4 and below, mx4j library is used to provide the MBean server.
The commented out section of jetty-jmx.xml needs to be added to create the
mbean server and to register the JMX RMI connector:

Then, you will need to ensure that you have the rmiregistry running. The start sequence becomes:

You then need to configure jconsole to find this remote connector using the Advanced panel and enter the connector url like so:

Click the Connect button and you will be able to manipulate the Jetty mbeans.

  • No labels
Contact the core Jetty developers at www.webtide.com
private support for your internal/customer projects ... custom extensions and distributions ... versioned snapshots for indefinite support ... scalability guidance for your apps and Ajax/Comet projects ... development services from 1 day to full product delivery