code: public static void registerMbean(Object mbean, ObjectName name) {
          registerMbean(ManagementFactory.getPlatformMBeanServer(),
                        JmxUtils.createModelMBean(mbean),
                        name);
      }
docs: Register the given mbean with the platform mbean server
  
  @param mbean The mbean to register
  @param name The name to register under