public static <T>ObjectName registerMBean(MBeanServer mbeanSrv,@Nullable String gridName,@Nullable String grp,String name,T impl,@Nullable Class<T> itf) throws JMException {
  assert mbeanSrv != null;
  assert name != null;
  assert itf != null;
  DynamicMBean mbean=new IgniteStandardMXBean(impl,itf);
  mbean.getMBeanInfo();
  return mbeanSrv.registerMBean(mbean,makeMBeanName(gridName,grp,name)).getObjectName();
}

public static < T > ObjectName registerMBean ( MBeanServer mbeanSrv , @ Nullable String gridName , @ Nullable String grp , String name , T impl , @ Nullable Class < T > itf ) throws JMException { assert mbeanSrv != null ; assert name != null ; assert itf != null ; DynamicMBean mbean = new IgniteStandardMXBean ( impl , itf ) ; mbean . getMBeanInfo ( ) ; return mbeanSrv . registerMBean ( mbean , makeMBeanName ( gridName , grp , name ) ) . getObjectName ( ) ; }
registers mbean with the server .
