atom feed2 messages in org.codehaus.jetty.user[jetty-user] Re: Configuring JMX on J...
FromSent OnAttachments
Baq HaidriFeb 4, 2009 11:40 am 
Baq HaidriFeb 4, 2009 11:46 am 
Subject:[jetty-user] Re: Configuring JMX on Jetty 6-->Never mind
From:Baq Haidri (
Date:Feb 4, 2009 11:46:44 am

After reading the docs a little more carefully, I realized that the Mbean container has a listener that is sensitive to changes. So I just moved up the bootstrapping of the MBeanContainer above everything else in the code, right after initializing my server, and then all the beans magically appeared.

Of course, I figured this out AFTER sending the e-mail!

Thanks for a great product, Baq


Long time reader, first time poster! I'm trying to get JMX configured on an embedded Jetty 6 instance and am having some trouble. Specifically, I can't seem to get information on requests/connections exposed. I've followed the instructions in the following two documents (and made the necessary translation from non-embedded to embedded):

I'm calling 'setStatsOn(true)' on my connectors, as well as adding my one context to a StatisticsHandler instance, which is then added as the only handler to the Server object: StatisticsHandler statsHandler = new StatisticsHandler(); statsHandler.addHandler(root); server.addHandler(statsHandler);

I then do the following:

MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer(); MBeanContainer mBeanContainer = new MBeanContainer(mBeanServer); server.getContainer().addEventListener(mBeanContainer); mBeanContainer.start();

When I take a look at JConsole, I see no information on requests (i.e. min, max, duration) or connections, even after making repeated requests to the instance.

I must be missing something‹any ideas what I¹m doing wrong?

Much appreciated, Baq