List of usage examples for org.apache.commons.pool2 ObjectPool clear
void clear() throws Exception, UnsupportedOperationException;
From source file:com.yahoo.athenz.common.server.db.AthenzDataSource.java
@Override synchronized public void clearPoolConnections() { ObjectPool<PoolableConnection> pool = getPool(); try {// w ww. ja v a 2s . c o m if (LOG.isDebugEnabled()) { LOG.debug("Clearing all active/idle (" + pool.getNumActive() + "/" + pool.getNumIdle() + ") connections from the pool"); } pool.clear(); } catch (Exception ex) { LOG.error("Unable to clear connections from the pool: " + ex.getMessage()); } }