code: private MBeanServer lookupJolokiaMBeanServer() {
          MBeanServer server = ManagementFactory.getPlatformMBeanServer();
          try {
              return server.isRegistered(JOLOKIA_MBEAN_SERVER_ONAME) ?
                      (MBeanServer) server.getAttribute(JOLOKIA_MBEAN_SERVER_ONAME, "JolokiaMBeanServer") :
                      null;
          } catch (JMException e) {
              throw new IllegalStateException("Internal: Cannot get Jolokia MBeanServer via JMX lookup: " + e, e);
          }
      }
docs: Check, whether the Jolokia MBean Server is available and return it.