When using an RMI Registry to store a JMX connector stub, the urlpath portion of the JMX service URL (see The JMX Service URL) does not change across broker startups and has the following form:
/jndi/rmi://brokerHost[:rmiPort]/brokerHost/portMapperPort/connectorName
This path consists of two segments:
/jndi/rmi://brokerHost[:rmiPort]
Specifies the RMI registry host and port at which the JMX contector stub is obtained by performing a JNDI lookup. The default port is 1099.
/brokerHost/portMapperPort/connectorName
Specifies the location within the RMI registry where the JMX connector stub is stored.
The following example shows the JMX service URL for the default jmxrmi connector in the case where an RMI registry is started on port 1098 on a host called yourhost:
# imqbrokerd -startRmiRegistry -rmiRegistryPort 1098
% imqcmd list jmx -u admin -passfile /myDir/psswds Listing JMX Connectors on the broker specified by: ------------------------- Host Primary Port ------------------------- localhost 7676 Name Active URL jmxrmi true service:jmx:rmi://yourhost/jndi/rmi://yourhost:1098 /yourhost/7676/jmxrmi ssljmxrmi false Successfully listed JMX Connectors. |
The JMX service URL could potentially contain a hostname and port three separate times, indicating the location of the JMX connector, the RMI registry, and the broker, respectively.