static void destroy() {
        while (! queue.isEmpty()) {
            try {
                ProxyConnection conn = queue.take();
                if (conn != null && conn.isValid(DB_ISVALID_TIMEOUT)) {
                    conn.reallyClose();
                }
            } catch (InterruptedException | SQLException ex) {
                LOGGER.error("Error in closing and destroying pool connections.", ex);
            }
        }
    }