Although host and port may be included, they are ignored by the RMI protocol. If urlPath is specified, it gives the Java Naming and Directory Interface (JNDI) location of an RMI stub (typically a location within an RMI registry) in the form
For example, the URL
specifies an RMI stub at the location
which is an RMI registry running at location myhost/myjmxconnector on port 1099 of host myhost.
Alternatively, if urlPath is omitted from the service URL, the JMX connector server will generate a client URL containing the actual RMI stub embedded within it in encoded and serialized form. For example, the service URL
will generate a client URL of the form
where rmiStub is an encoded and serialized representation of the RMI stub itself.