GlassFish Project - AMX (Appserver Management EXtensions) home page
 New to GlassFish | Community Guidelines  | Downloads | FAQ | How-Tos

Welcome to the AMX home page. This page is dedicated to discussing  the Appserver Management eXtensions MBean API available in Glassfish V2.x.

Feb 23. 2009 — for information on AMX in GlassFish V3, please see GlassFish V3 AMX SPI.

AMX in GlassFish V3 is designed to be extensible by any module (third parties) and will not be binary compatible with GlassFish V2 AMX, though similar hieararchy and concepts are used.

Page Contents


The majority of the GlassFish code is available under the Common Development and Distribution License (CDDL) v1.0  The following page contains details about the components in GlassFish and the licenses under which they are covered.

AMX is composed of a client-side and server-side portions:

  • a client layer, which provides dynamic proxies so that all APIs can be used without knowledge of JMX.
  • server-side implementation, all of which is provided by JMX MBeans.

Clients may use the AMX APIs by including appserv-ext.jar in their java client classpath.


Please see note at top regarding GlassFish V3 vs V2.

AMX: Design and Use Describes the design considerations used in developing the AMX API and covers common usage scenarios.
AMX: Implementation Describes the AMX implementation. Suitable for developers wishing to understand or modify AMX.
FAQ Frequently asked questions.
Javadoc Complete javadoc for the AMX API
Sample code Describes how to check out, build, and run the sample code in GlassFish V2.x. Not applicable to GlassFish V3.
Unit tests After checking out the source code, please see:
(link will work only if you are viewing this page as a file in the checked-out source tree).

AMX News

21 July 2006—Reorganized this page, added instructions on checking out the sample code.

10 April 2006—Material has been added to AMX: Implementation. Though not yet complete, it will be helpful to anyone wanting to understand how AMX is implemented. The AMX: Design and Use document was updated recently also.

21 March 2006—The complex types support has been comitted to cvs. Complex types are now supported with the Logging interface (LogQueryResult), and certain web services types (WebServiceEndpointInfo and MessageTrace). The AMX Javadoc has been updated.

09 March 2006—The Java Generics modifications to the AMX interfaces are now committed to cvs. The AMX Javadoc has been updated accordingly.

06 March 2006—Please see the summary of changes to the AMX 9.0 API.

06 March 2006—The Java Generics proposal is still pending. The code changes are done and tested, but not yet committed.

28 February 2006—The AMX APIs will undergo modification for Java Generics. Please see the proposal.

28 February 2006—The AMX white paper has been updated. Though not yet complete, it contains a substantial amount of content now.

23 January 2006—An AMX white paper is in progress. Though not yet complete, it already contains some helpful information.

19 January 2006—Final AMX Javadoc is now checked in and available for viewing, including Sample Code.

Sample Code

The sample code may be checked out from the repository without checking out any of the other source code:

MB:/amx-samples lloyd$ cvs -d login
Logging in to
CVS password: ********
MB:/amx-samples lloyd$ cvs -d
  co glassfish/www/javaee5/amx
cvs server: Updating glassfish/www/javaee5/amx

You will also need a copy of appserv-ext.jar (for AMX client interfaces) and javaee.jar (for JSR77 Stats and Statistics interfaces). The casen be obtained from an installed (or built) version of Glassfish. Both appserv-ext.jar and javaee.jar are found in $INSTALL_ROOT/lib. Copy them to the samples directory.

Next, copy appserv-ext.jar to the samples directory:

MB:/amx-samples/www/javaee5/amx/samples lloyd$ cp /gf/run/lib/appserv-ext.jar .
MB:/amx-samples/www/javaee5/amx/samples lloyd$ cp /gf/run/lib/javaee.jar .

Compile the samples:

MB:/gf/build/glassfish/www/javaee5/amx/samples lloyd$ sh
Compiling AMX Samples...

Start the server (if not already running).

MB:/ gf/run/bin/asadmin start-domain

Starting Domain domain1, please wait.
Log redirected to /gf/run/domains/domain1/logs/server.log.
Domain domain1 is ready to receive client requests.
Additional services are being started in background. Domain [domain1] is running
[Sun Java System Application Server Platform Edition 9.1 (build )] with its configuration and logs at: [/gf/run/domains]. Admin Console is available at [http://localhost:4849]. Use the same port [4849] for "asadmin" commands. User web applications are available at these URLs: [http://localhost:8080 https://localhost:8181 ]. Following web-contexts are available: [/web1 /asadmin ]. Standard JMX Clients (like JConsole) can connect to JMXServiceURL: [service:jmx:rmi:///jndi/rmi://MB.local:8686/jmxrmi] for domain management purposes. Domain listens on at least following ports for connections: [8080 8181 4849 3700 3820 3920 8686 ].

Run the Samples command line demo.
Note: if you have changed the default port for the JMX connector and/or changed the admin username or password from the defaults, edit to reflect those changes.

MB:/gf/build/glassfish/www/javaee5/amx/samples lloyd$ sh
Reading properties from: ""
Connecting...:host=localhost, port=8686,
user=admin, password=adminadmin, tls=false Connected: host=localhost, port=8686,
user=admin, password=adminadmin, tls=false Enter command> help

Unit/Acceptance Tests

AMX uses JUnit as its test framework, and has extensive unit tests.  For more information, see:


There are also additional links from the amx-unit-tests.html page.

ToDo List


ToDo list will be maintained using Issue Tracker Task issue type. You can query Issue Tracker using issue type Task or click here to check out the ToDo list.