How to access local adapter

Hi,

I'm running a JMX application using local adapter (-Dcom.sun.management.jmxremote placed on the command line). Is there any way to connect to the application programmatically, like jconsole does? It seems there is no information on issue in tutorial. If this is not possible and I need to start "remote" adaptor like described in JMX Connectors tutorial section could you let me know this fact?

Thanks,

Roman

[438 byte] By [roman.k.va] at [2007-10-3 7:52:38]
# 1

Hi Roman,

J2SE 5.0 doesn't provide a public programmatic interface to connect to the out-of-the-box management agent for local management. JConsole in J2SE 5.0 accesses the local connector server through a private interface. So in your case you will have to start your application with the com.sun.management.jmxremote.port=xxx option and connect to it as if you were remotely accessing it.

However, JDK 6 adds support for dynamically enabling any given running Java application for monitoring and management and connecting to it through the new Attach API.

For more detailed info have a look at the following link:

http://download.java.net/jdk6/docs/technotes/guides/management/agent.html

Regards,

Luis-Miguel ALVENTOSA

JMX Java SE development team

Sun Microsystems, Inc.

lmalventa at 2007-7-15 2:54:47 > top of Java-index,Core,Monitoring & Management...
# 2
Thank you very much for information, you helped me a lot.
roman.k.va at 2007-7-15 2:54:47 > top of Java-index,Core,Monitoring & Management...