The JMX agent docs explains there's a local mode when com.sun.management.jmxremote.port
is not supplied.
The doc also seems to imply this requires temporary files and is only understood by JConsole.
I am wondering is above correct and if so how to connect to the agent using RMI?
It's called the Attach API . Technically, it does use a port, but it does not require the target JVM to have pre-launched a JMX Connector Server. Once connected, the target JVM will launch a new connector server and the JMXServiceURL of that server can be retrieved from the VirtualMachine instance by looking up the agent property com.sun.management.jmxremote.localConnectorAddress .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.