static void returnConnection(Connection conn) throws DaoConnectException {
        try {
            if (conn == null || !conn.isValid(DB_ISVALID_TIMEOUT)) {
                throw new DaoConnectException("Can't return: null or unvalid connection.");
            }
        } catch (SQLException ex) {
            throw new DaoConnectException("Error in check valid connection.", ex);
        }

        try {
            queue.offer((ProxyConnection) conn);
        } catch (Exception ex) {
            throw new DaoConnectException("Can't return unknown connection.", ex);
        }
    }