private static void registerMbeansFromPropsFile(MBeanServer mBeanServer) throws Exception {
  JamonPropertiesLoader loader=new JamonPropertiesLoader();
  List<String> jamonJmxBeanProperties=loader.getMxBeans();
  Iterator<String> iter=jamonJmxBeanProperties.iterator();
  while (iter.hasNext()) {
    String beanInfo=iter.next();
    MonitorMXBean mXbean=MonitorMXBeanFactory.create(beanInfo);
    mBeanServer.registerMBean(mXbean,MonitorMXBeanFactory.getObjectName(mXbean));
    MonitorMXBean mXbeanDelta=MonitorMXBeanFactory.createDelta(beanInfo);
    mBeanServer.registerMBean(mXbeanDelta,MonitorMXBeanFactory.getDeltaObjectName(mXbeanDelta));
  }
}

private static void registerMbeansFromPropsFile ( MBeanServer mBeanServer ) throws Exception { JamonPropertiesLoader loader = new JamonPropertiesLoader ( ) ; List < String > jamonJmxBeanProperties = loader . getMxBeans ( ) ; Iterator < String > iter = jamonJmxBeanProperties . iterator ( ) ; while ( iter . hasNext ( ) ) { String beanInfo = iter . next ( ) ; MonitorMXBean mXbean = MonitorMXBeanFactory . create ( beanInfo ) ; mBeanServer . registerMBean ( mXbean , MonitorMXBeanFactory . getObjectName ( mXbean ) ) ; MonitorMXBean mXbeanDelta = MonitorMXBeanFactory . createDelta ( beanInfo ) ; mBeanServer . registerMBean ( mXbeanDelta , MonitorMXBeanFactory . getDeltaObjectName ( mXbeanDelta ) ) ; } }
load jamon configurable jmx monitors from the jamon properties file . if there are no configurable monitors taken from the file then a set of default ones will be created ( pagehits , sql ) .
