core/src/main/java/com/orientechnologies/orient/core/storage/impl/local/statistic/OPerformanceStatisticManager.java
public void registerMBean(String storageName, int storageId) {
    if (mbeanIsRegistered.compareAndSet(false, true)) {
      try {
        final MBeanServer server = ManagementFactory.getPlatformMBeanServer();
        final ObjectName mbeanName = new ObjectName(getMBeanName(storageName, storageId));
        if (!server.isRegistered(mbeanName)) {
          server.registerMBean(new OPerformanceStatisticManagerMBean(this), mbeanName);
        } else {
          mbeanIsRegistered.set(false);
          OLogManager.instance().warn(this,
              "MBean with name %s has already registered. Probably your system was not shutdown correctly"
                  + " or you have several running applications which use OrientDB engine inside", mbeanName.getCanonicalName());
        }

      } catch (MalformedObjectNameException | InstanceAlreadyExistsException | NotCompliantMBeanException | MBeanRegistrationException e) {
        throw OException.wrapException(new OStorageException("Error during registration of profiler MBean"), e);
      }
    }
  }
public void registerMBean(String storageName, int storageId) {
    if (mbeanIsRegistered.compareAndSet(false, true)) {
      try {
        final MBeanServer server = ManagementFactory.getPlatformMBeanServer();
        final ObjectName mbeanName = new ObjectName(getMBeanName(storageName, storageId));
        if (!server.isRegistered(mbeanName)) {
          server.registerMBean(new OPerformanceStatisticManagerMBean(this), mbeanName);
        } else {
          mbeanIsRegistered.set(false);
          OLogManager.instance().warn(this,
              "MBean with name %s has already registered. Probably your system was not shutdown correctly"
                  + " or you have several running applications which use OrientDB engine inside", mbeanName.getCanonicalName());
        }

      } catch (MalformedObjectNameException | InstanceAlreadyExistsException | NotCompliantMBeanException | MBeanRegistrationException e) {
        throw OException.wrapException(new OStorageException("Error during registration of profiler MBean"), e);
      }
    }
  }
public void registerMBean ( String storageName , int storageId ) { if ( mbeanIsRegistered . compareAndSet ( false , true ) ) { try { final MBeanServer server = ManagementFactory . getPlatformMBeanServer ( ) ; final ObjectName mbeanName = new ObjectName ( getMBeanName ( storageName , storageId ) ) ; if ( ! server . isRegistered ( mbeanName ) ) { server . registerMBean ( new OPerformanceStatisticManagerMBean ( this ) , mbeanName ) ; } else { mbeanIsRegistered . set ( false ) ; OLogManager . instance ( ) . warn ( this , "MBean with name %s has already registered. Probably your system was not shutdown correctly" + " or you have several running applications which use OrientDB engine inside" , mbeanName . getCanonicalName ( ) ) ; } } catch ( MalformedObjectNameException | InstanceAlreadyExistsException | NotCompliantMBeanException | MBeanRegistrationException e ) { throw OException . wrapException ( new OStorageException ( "Error during registration of profiler MBean" ) , e ) ; } } }
Registers JMX bean for current manager.

@param storageName Name of storage of given manager
@param storageId   Id of storage of given manager

@see OStorage#getName()
@see OIdentifiableStorage#getId()
Registers JMX bean for current manager .