docs: public static <K, V> void registerCacheObject(AbstractJCache<K, V> cache, ObjectNameType objectNameType) {
        //these can change during runtime, so always look it up
        MBeanServer mBeanServer = cache.getMBeanServer();
        if (mBeanServer != null) {
           ObjectName registeredObjectName = calculateObjectName(cache, objectNameType);
           try {
              if (objectNameType.equals(ObjectNameType.CONFIGURATION)) {
                 if (!isRegistered(cache, objectNameType)) {
                    SecurityActions.registerMBean(cache.getCacheMXBean(), registeredObjectName, mBeanServer);
                 }
              } else if (objectNameType.equals(ObjectNameType.STATISTICS)) {
                 if (!isRegistered(cache, objectNameType)) {
                    SecurityActions.registerMBean(cache.getCacheStatisticsMXBean(), registeredObjectName, mBeanServer);
                 }
              }
           } catch (Exception e) {
              throw new CacheException("Error registering cache MXBeans for CacheManager "
                    + registeredObjectName + " . Error was " + e.getMessage(), e);
           }
        }
     }