protected void stopPool(GenericObjectPool pool) {
   pool.clear();
   try {
     pool.close();
   } catch (Exception e) {
     _log.error("ERROR >> Failed to close pool ", e);
   }
 }
  public static synchronized void releaseResources() {
    log.debug("Releasing resources...");
    if (isInitialized) {
      try {
        if (workerPool.getNumActive() > 0) {
          log.warn("Shutting down even though there are still some active compute workers");
        }

        workerPool.clear();
        workerPool.close();
      } catch (Exception e) {
        log.error("Problem shutting down compute service", e);
      }
    }
  }