Approved. Paul
On 3/1/12 11:44 AM, Dmitry Samersoff wrote:
Problem Currently, a JMX agent must be started from the Java command line in order to enable JMX monitoring from a remote machine, though local (same-machine) clients can attach dynamically. Once the agent is started, it stops only when the JVM exits. To diagnose problems in a production environment, we need the capability to connect to a remote target JVM to verify or run queries, but that JVM may or may not have a management agent started. We also need to be able to stop a running agent in order to release the resources (e.g. opened ports and memory) associated with the connection. The remote management agent requires two TCP ports to communicate, one for the RMI registry and other one for RMI itself. Currently we can specify only the RMI registry port. The one for RMI is chosen randomly and not known to the client. Despite the fact that most modern firewalls can handle this situation with stateful rules, the ability to specify both ports is desirable. Solution Create diagnostic commands usable by the jcmd utility to stop running a jmx agent and then start it again with different properties. The syntax is similar to the the way the information is specified on the Java command line. JDK8 changeset: http://hg.openjdk.java.net/hsx/hsx23/hotspot/rev/3322dd7f0a4d http://hg.openjdk.java.net/jdk8/tl/jdk/rev/1e737abbff6f List of reviewers: Mandy Chung Karen Kinnear