use of org.apache.geode.modules.session.internal.jmx.SessionStatistics in project geode by apache.
the class GemfireSessionManager method registerMBean.
/**
* Register a bean for statistic gathering purposes
*/
private void registerMBean() {
mbean = new SessionStatistics();
try {
InitialContext ctx = new InitialContext();
MBeanServer mbs = MBeanServer.class.cast(ctx.lookup("java:comp/env/jmx/runtime"));
ObjectName oname = new ObjectName(Constants.SESSION_STATISTICS_MBEAN_NAME);
mbs.registerMBean(mbean, oname);
} catch (Exception ex) {
LOG.warn("Unable to register statistics MBean. Error: {}", ex.getMessage());
}
}
Aggregations