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 ?