JMX - Agent

> Procedural Languages > Java > Java - Java Management eXtensions (JMX)

1 - About

A JMX agent consists of:

JMX agents are usually located on the same machine as the resources they control, but this is not a requirement.

Advertising

3 - How to

3.1 - Start an application with the JMX agent

java -Dcom.sun.management.jmxremote.port=1090
     -Dcom.sun.management.jmxremote.ssl=false
     -Dcom.sun.management.jmxremote.authenticate=false
      -jar myApplication.jar

This instruction uses the Sun's built-in support to enable a JMX agent.

You can programmatically start a JMX agent with the RMI connector using javax.management.remote API.

4 - JMX service URL

To connect to a Jmx agent, you use a Jmx Service Url