0

I want to enable JMX in jetty 9 for collecting statistics. According to the documentation I have to do this as follows

Server _server = new Server();
// Setup JMX 
MBeanContainer mbContainer=new MBeanContainer(ManagementFactory.getPlatformMBeanServer());
_server.getContainer().addEventListener(mbContainer);
_server.addBean(mbContainer);

But it seems that Server doesn't have a getContainer API. How can I enable JMX ?

Also I want to collect these counters into Ganglia? Can I do this from my application or to I need a plugin for retrieving this using JMX ?

Joakim Erdfelt
  • 46,896
  • 7
  • 86
  • 136
user2004360
  • 209
  • 2
  • 3
  • 8

0 Answers0