private void stopDistributedSystem() {
    // disconnect from the distributed system...
    try {
      disconnectFromSystem();
    } catch (Exception e) {
      // disconnectFromSystem already prints any Exceptions
    } catch (VirtualMachineError err) {
      SystemFailure.initiateFailure(err);
      throw err;
    } catch (Error e) {
      // Whenever you catch Error or Throwable, you must also catch VirtualMachineError (see above).
      // However, there is _still_ a possibility that you are dealing with a cascading error
      // condition,
      // so you also need to check to see if the JVM is still usable:
      SystemFailure.checkFailure();
    }
  }
Deregisters everything this Agent registered and releases the MBeanServer.
geode-core/src/main/java/org/apache/geode/admin/jmx/internal/AgentImpl.java