@Override
  public void startManager() {
    if (!cache.getInternalDistributedSystem().getConfig().getJmxManager()) {
      throw new ManagementException(
          "Could not start the manager because the gemfire property \"jmx-manager\" is false.");
    }

    synchronized (instances) {
      verifyManagementService();

      if (federatingManager != null && federatingManager.isRunning()) {
        throw new AlreadyRunningException(
            "Manager is already running");
      }

      if (!isManagerCreated()) {
        createManager();
      }

      boolean started = false;
      try {
        system.handleResourceEvent(ResourceEvent.MANAGER_START, null);
        federatingManager.startManager();
        if (agent != null) {
          agent.startAgent();
        }
        cache.getJmxManagerAdvisor().broadcastChange();
        started = true;
      } catch (RuntimeException | Error e) {
        logger.error("Jmx manager could not be started because {}", e.getMessage(), e);
        throw e;
      } finally {
        if (!started) {
          if (federatingManager != null) {
            federatingManager.stopManager();
          }
          system.handleResourceEvent(ResourceEvent.MANAGER_STOP, null);
        }
      }
    }
  }
This membership listener will listen on membership events after the node has transformed into a
Managing node.
geode-core/src/main/java/org/apache/geode/management/internal/SystemManagementService.java