users@grizzly.java.net

Re: How to Enable JMX

From: Ryan Lubke <ryan.lubke_at_oracle.com>
Date: Mon, 04 Apr 2011 15:34:41 -0700

On 4/4/11 10:48 AM, gagansnt wrote:
> Hi Ryan
>
> Your blog does not talk about any annotations that I need to add in my code.
> Is it enabled by default and I do not need to anything in code ?

If you're interested in only seeing what Grizzly exposes by default,
then there
is nothing you need to add.

> My project is not a Maven project but I have included the
> gmbal-3.1.0-b001.jar file in my project. When I tried without adding
> anything in my code and just including the jar then I am unable to see the
> MBeans "com.sun.grizzly" mentioned by you on your blog.

The blog outdates our package name changes. They should be
org.glassfish.grizzly (it
was com.glassfish.grizzly, but as of this afternoon, I've fixed that).

> If you could please elaborate a bit about what changes I need to make in
> code.


You need to enable JMX in the server configuration by calling (something
it seems
was missed in the blog)

HttpServer.getServerConfiguration().setJmxEnabled(true).

I'll be updating the blog entry as well as being working on including
this information
in the 2.0 documentation.


> Thanks in advance.
> Gagan
>
> --
> View this message in context: http://grizzly.1045725.n5.nabble.com/How-to-Enable-JMX-tp4282104p4282338.html
> Sent from the Grizzly - Users mailing list archive at Nabble.com.