code: protected void dispose() {
  		// Remove shutdown hook to prevent resource leaks
  		ShutdownHookUtil.removeShutdownHook(shutdownHook, getClass().getSimpleName(), LOG);
  
  		try {
  			PlanExecutor executor = this.executor;
  			if (executor != null) {
  				executor.stop();
  			}
  		}
  		catch (Exception e) {
  			throw new RuntimeException("Failed to dispose the session shutdown hook.");
  		}
  	}
docs: ------------------------------------------------------------------------