This Message Queue Developer’s Guide for JMX Clients describes the application programming interface provided in Sun Java System Message Queue 4.1 for programmatically configuring and monitoring Message Queue resources in conformance with the Java Management Extensions (JMX). As in earlier versions of Message Queue, these functions are also available to system administrators by way of the Message Queue Administration Console and command line utilities, as described in the Message Queue Administration Guide. As of release 4.1, the API described here makes the same administrative functionality available programmatically from within a running client application.
Message Queue 4.1 also includes several new broker properties and command-line options to support the new JMX API. These features are described in the Message Queue Release Notes for release 4.1, and will eventually be incorporated into the Message Queue Administration Guide.
This guide is intended for Java application developers wishing to use the Message Queue JMX API to perform Message Queue administrative tasks programmatically from within a client application.
This guide assumes that you are already familiar with general Message Queue concepts, administrative operations, and Java client programming, as described in the following manuals:
Message Queue Technical Overview
Message Queue Administration Guide
Message Queue Developer’s Guide for Java Clients
You should also be familiar with the general principles of the Java Management Extensions, as described in the following publications:
Java Management Extensions Instrumentation and Agent Specification
Java Management Extensions (JMX) Remote API Specification
Together, these two publications are referred to hereafter as the JMX Specification.
This guide consists of the following chapters:
Chapter 1, Introduction to JMX Programming for Message Queue Clients introduces the basic concepts and principles of the Message Queue JMX interface.
Chapter 2, Using the JMX API provides code examples showing how to use the JMX application programming interface from within your Message Queue clilent applications.
Chapter 3, Message Queue MBean Reference provides detailed information on the attributes, operations, and notifications provided by Message Queue managed beans (MBeans).
Appendix A, Alphabetical Reference lists the MBean attributes, operations, and notifications alphabetically, with references back to their descriptions in the body of the manual.
In addition to this guide, Sun provides the additional documentation resources described in the following subsections.
The Message Queue documentation set comprises the documents shown in Table P–1, in the order in which you would normally use them.
Table P–1 Message Queue Documentation Set
Document |
Audience |
Description |
---|---|---|
Message Queue Installation Guide |
Developers and administrators |
Explains how to install Message Queue software on Solaris, Linux, and Windows platforms |
Message Queue Release Notes |
Developers and administrators |
Includes descriptions of new features, limitations, and known bugs, as well as technical notes |
Message Queue Technical Overview |
Developers and administrators |
Introduces basic Message Queue concepts, features, and components |
Message Queue Administration Guide |
Administrators (also recommended for developers) |
Provides background and information needed to perform administrative tasks using Message Queue administration tools |
Message Queue Developer’s Guide for Java Clients |
Developers |
Provides information on developing Java client programs using the Message Queue implementation of the Java Message Service (JMS) and SOAP/JAXM specifications |
Message Queue Developer’s Guide for C Clients |
Developers |
Provides information on developing C and C++ client programs using Message Queue's C application programming interface (C API) |
Message Queue Developer’s Guide for JMX Clients |
Developers |
Provides information on developing Java client programs using the Message Queue implementation of the Java Management Extensions (JMX) API |
The Message Queue JMX API conforms to the Java Management Extensions (JMX) standard, described in the Java Management Extensions Instrumentation and Agent Specification and the Java Management Extensions (JMX) Remote API Specification. These documents can be downloaded from the URLs
http://jcp.org/aboutJava/communityprocess/final/jsr003
and
http://jcp.org/aboutJava/communityprocess/final/jsr160
respectively.
For a general conceptual introduction to JMX principles and architecture, see the Java Management Extensions (JMX) Technology Overview at
http://java.sun.com/j2se/1.5.0/docs/guide/jmx/overview/JMXoverviewTOC.html
and the Java Management Extensions (JMX) Technology Tutorial at
http://java.sun.com/j2se/1.5.0/docs/guide/jmx/tutorial/tutorialTOC.html
Message Queue API documentation in JavaDoc format is included in your Message Queue installation at the locations shown in Table P–2, depending on your platform. This documentation can be viewed in any HTML browser. It includes standard JMS API documentation as well as Message Queue–specific APIs for Message Queue administered objects, which are of value to developers of messaging applications.
Table P–2 JavaDoc Locations
Platform |
Location |
---|---|
Solaris |
/usr/share/javadoc/imq/index.html |
Linux |
/opt/sun/mq/javadoc/index.html |
Windows |
IMQ_HOME\javadoc\index.html where IMQ_HOME is the Message Queue base directory set by the Message Queue Installer (C:\Program Files\Sun\MessageQueue4 by default) |
Example client applications providing sample Java application code using JMX are included in your Message Queue installation at the locations shown in Table P–3, depending on your platform.
Table P–3 JMX Code Example Locations
Platform |
Location |
---|---|
Solaris |
/usr/demo/imq/jmx |
Linux |
/opt/sun/mq/examples/jmx |
Windows |
IMQ_HOME\demo\jmx where IMQ_HOME is the Message Queue base directory set by the Message Queue installer (C:\Program Files\Sun\MessageQueue4 by default) |
Table P–4 shows the typographic conventions used inMessage Queue documentation.
Table P–4 Typographic Conventions
Typeface |
Meaning |
Example |
---|---|---|
AaBbCc123 |
Names of commands, files, and directories, and onscreen computer output |
Edit your .login file. Use ls -a to list all files. machine_name% you have mail. |
AaBbCc123 |
What you type, as contrasted with onscreen computer output |
machine_name% su Password: |
aabbcc123 |
Placeholder: replace with a real name or value |
The command to remove a file is rm filename. |
AaBbCc123 |
Book titles, new terms, and emphasized words |
Read Chapter 6 in the User's Guide. A cache is a copy that is stored locally. Do not save the file. Note – Some emphasized items appear online in boldface. |
Table P–5 shows symbol conventions used inMessage Queue documentation.
Table P–5 Symbol Conventions
Symbol |
Description |
Example |
Meaning |
---|---|---|---|
[ ] |
Encloses optional arguments and command options |
ls [-l] |
The -l option is optional. |
{ | } |
Encloses a set of choices for a required command option |
-d {y|n} |
The -d option requires that you use either the y argument or the n argument. |
${ } |
Indicates a variable reference |
${com.sun.javaRoot} |
References the value of the variable com.sun.javaRoot. |
- |
Joins simultaneous multiple keystrokes |
Ctrl-A |
Hold down the Control key while pressing the A key. |
+ |
Joins consecutive multiple keystrokes |
Ctrl+A+N |
Press the Control key, release it, and then press the subsequent keys. |
-> |
Indicates hierarchical menu selection in a graphical user interface |
File -> New -> Templates |
From the File menu, choose New; from the New submenu, choose Templates. |
Message Queue makes use of three directory variables; how they are set varies from platform to platform. Table P–6 describes these variables and how they are used on the Solaris, Linux, and Windows platforms.
The information in Table P–6 applies only to the standalone installation of Message Queue. When Message Queue is installed and run as part of an Application Server installation, the values of the directory variables are set differently: IMQ_HOME is set to appServer_install_dir/imq (where appServer_install_dir is the Application Server installation directory), and IMQ_VARHOME is set to appServer_domainName_dir/imq (where appServer_domainName_dir is the domain directory for the domain starting the Message Queue broker).
In this manual, these directory variables are shown without platform-specific environment variable notation or syntax (such as $IMQ_HOME on UNIX). Pathnames generally use UNIX directory separator notation (/).
Table P–7 shows the default UNIX® system prompt and superuser prompt for the C shell, Bourne shell, Korn shell, and Windows operating system.
Table P–7 Shell Prompts
Shell |
Prompt |
---|---|
C shell |
machine_name% |
C shell for superuser |
machine_name# |
Bourne shell and Korn shell |
$ |
Bourne shell and Korn shell for superuser |
# |
Windows |
C:\ |
The Sun Web site provides information about the following additional resources:
Besides searching Sun product documentation from the docs.sun.com Web site, you can use a search engine by typing the following syntax in the search field:
search-term site:docs.sun.com
For example, to search for “broker,” type the following:
broker site:docs.sun.com
To include other Sun Web sites in your search such as java.sun.com, www.sun.com, and developers.sun.com), use sun.com in place of docs.sun.com in the search field.
Third-party URLs referenced in this document provide additional, related information.
Sun is not responsible for the availability of third-party Web sites mentioned in this document. Sun does not endorse and is not responsible or liable for any content, advertising, products, or other materials that are available on or through such sites or resources. Sun will not be responsible or liable for any actual or alleged damage or loss caused or alleged to be caused by or in connection with use of or reliance on any such content, goods, or services that are available on or through such sites or resources.
Sun is always interested in improving its documentation and welcomes your comments and suggestions. To share your comments, go to the Sun documentation Web site at
and click Send Comments. In the resulting online form, provide the document title and part number along with your comment. (The part number is a 7-digit or 9-digit number that can be found on the book’s title page or in the document's URL. For example, the part number of this book is 819-7758.)