JMXServiceURLrepresents an "address of a JMX API connector server" and that it needs to meet the format
The Javadoc-generated documentation for the javax.management.remote package and for the javax.management.remote.rmi package are even more useful in understanding the substance of the JMX connector server address (
The javax.management.remote package explains the JMX connector server address in greater detail and even offers an example of such an address for an RMI connector:
service:jmx:rmi:///jndi/rmi://myhost:1099/mynamewhere the emphasized text indicates your own host and port. This package's Javadoc description also informs us that the first
rmiin the address specifies the RMI connector while the second
rmiin the address specifies the RMI registry.
As you would expect, the Javadoc description for the RMI-specific package
javax.management.remote.rmihas even more specific RMI details than does the more general
javax.management.remotepackage. This documentation provides deep coverage of the many different ways that an RMI connection can be established and looked up.
I prefer to use a
JMXServiceURLof the format
service:jmx:rmi:///jndi/rmi://<host>:<port>/jmxrmifor specifying my standard Remote JMX Connectors via RMI.
A nice pictorial representation of the JMX Connector Server address is available in the image at http://edong.net/2008v1/docs/jmx/jmx-proxy.png. This image shows which portion of the address makes up the RMI connector and which part makes up the RMI registry address. Monitor Your Applications with JConsole - Part 3 provides coverage of the connector server address using RMI. Chapter 9 ("Distributed Services and Connectors") of "JMX Accelerated Howto" covers the JMX Connector Server address in significant detail and provides several examples. The JMX Technology for Remote Management section of Getting Started with Java Management Extensions: Developing Management and Monitoring Solutions contains an example of using a JMX RMI Connector Server. Finally, the Remote Management lesson of the Java Management Extensions Trail of the Java Tutorials contains very useful background on using Remote JMX. The example code that comes with the JMX tutorial is especially useful.