users@glassfish.java.net

Re: Connect to AMX Locally

From: <glassfish_at_javadesktop.org>
Date: Tue, 14 Aug 2007 13:41:27 PDT

Good question.
The key is to use the ProxyFactory Class (https://glassfish.dev.java.net/nonav/javaee5/amx/javadoc/com/sun/appserv/management/client/ProxyFactory.html).

- Pass the MBeanServer that Application Server uses (That would be java.lang.management.ManageMentFactory.getPlatformMBeanServer());
- Call ProxyFactory.findInstance(mbs);
- Create the DomainRoot from there.

That's it, you are done.

Regards,
Kedar
[Message sent by forum member 'km' (km)]

http://forums.java.net/jive/thread.jspa?messageID=230880