static void closeEnvironmentFactory(String configResource) { EnvironmentFactory environmentFactory = environmentFactories .remove(configResource); if (environmentFactory != null) { LOG.debug("closing environment factory for [" + configResource + "]"); environmentFactory.close(); } }
@Override public void run() { try { if (environmentFactory != null) { environmentFactory.close(); environmentFactory = null; } } catch (final Exception ee) { LOG.severe(Misc.getStackTraceFrom(ee)); } } }