Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8044135

Add API to start JMX agent from attach framework

XMLWordPrintable

    • b19

        To be able to remove management-api.jar (see JDK-8043939) we should introduce an API to accomplish the same thing.

        The proposed API is:

            /**
             * Starts the JMX management agent in the target virtual machine.
             *
             * <p> The configuration properties are the same as those specified on
             * the command line when starting the JMX management agent. In the same
             * way as on the command line, you need to specify at least the
             * {@code com.sun.management.jmxremote.port} property.
             *
             * <p> See the online documentation for "Monitoring and Management Using
             * JMX Technology" for further details.
             *
             * <p> This method replaces the previous method of loading the
             * {@code management-api.jar} agent to start the management agent.
             *
             * @param agentProperties
             * A Properties object containing the configuration properties
             * for the agent.
             *
             * @throws IOException
             * If an I/O error occurs
             *
             * @since 1.9
             */
            public abstract void startManagementAgent(Properties agentProperties) throws IOException;

            /**
             * Starts the local JMX management agent in the target virtual machine.
             *
             * <p> See the online documentation for "Monitoring and Management Using
             * JMX Technology" for further details.
             *
             * <p> This method replaces the previous method of loading the
             * {@code management-api.jar} agent to start the management agent.
             *
             * @throws IOException
             * If an I/O error occurs
             *
             * @since 1.9
             */
            public abstract void startLocalManagementAgent() throws IOException;

              sla Staffan Larsen (Inactive)
              sla Staffan Larsen (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: