/** * Removes all ConnectionInfos from tracking where for the key & passed in Connection * * @param key the connection key * @param con the connection to remove */ private static synchronized void remove(String key, Connection con) { final Collection<ConnectionInfo> conInfos = getConnectionInfos(key); for (Iterator<ConnectionInfo> i = conInfos.iterator(); i.hasNext(); ) { final ConnectionInfo conInfo = i.next(); if (conInfo.getConnection() == con) { i.remove(); } } OPEN_CONNECTIONS.get().put(key, conInfos); }