dev@glassfish.java.net

Re: External JMX Connections

From: Lloyd L Chambers <Lloyd.Chambers_at_Sun.COM>
Date: Thu, 14 Feb 2008 10:17:27 -0800

Jason,

Glassfish always starts the MBeanServer. Check the server log for
the URL to use for connection eg:

[#|2008-02-14T10:15:52.994-0800|INFO|sun-appserver9.1|
javax.enterprise.system.tools.admin|
_ThreadID=13;_ThreadName=Thread-15;service:jmx:rmi:///jndi/rmi://
192.168.1.8:8686/jmxrmi;|ADM1504: Here is the JMXServiceURL for the
Standard JMXConnectorServer: [service:jmx:rmi:///jndi/rmi://
192.168.1.8:8686/jmxrmi]. This is where the remote administrative
clients should connect using the standard JMX connectors|#]

You should not -Dcom.sun.management.jmxremote as this will not work
correctly due to classloading issues.

Lloyd Chambers

On Feb 13, 2008, at 1:54 PM, Jason Lee wrote:

> I should have sent this here too. :) Thanks!
>
> ---------- Forwarded message ----------
> From: Jason Lee <jason_at_steeplesoft.com>
> Date: Feb 13, 2008 2:50 PM
> Subject: External JMX Connections
> To: users_at_glassfish.dev.java.net
>
> I'd like to make my web app create an MBean and register it with
> the platform MBean Server, which I would assume would be
> GlassFish's? In my Java SE testing environment, I'm using
>
> MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
>
> With my app deployed, I can only assume it's working, as I can't
> connect to the MBean Server via jconsole. My first though was to
> add -Dcom.sun.management.jmxremote to my GlassFish config, but then
> the server wouldn't restart. What is the recommended approach for
> doing this? Is there one? :)
>
> Thanks!
>
> --
> Jason Lee, SCJP
> Software Architect -- Objectstream, Inc.
> Mojarra and Mojarra Scales Dev Team
> https://mojarra.dev.java.net
> https://scales.dev.java.net
> http://blogs.steeplesoft.com
>
> --
> Jason Lee, SCJP
> Software Architect -- Objectstream, Inc.
> Mojarra and Mojarra Scales Dev Team
> https://mojarra.dev.java.net
> https://scales.dev.java.net
> http://blogs.steeplesoft.com

---
Lloyd L Chambers
lloyd.chambers_at_sun.com
Sun Microsystems, Inc