freeDbHandles = (LinkedList)criToFreeDbHandlesMap.get(cri); } if (freeDbHandles != null) { synchronized(freeDbHandles) { freeDbHandles.remove(db); } } if (db.hasTransactions()) { synchronized (waitingToClose) {  if (!waitingToClose.contains(db)) { waitingToClose.add(db); } } } else { waitingToClose.remove(db);
    void releaseDbHandle(isc_db_handle db, FBConnectionRequestInfo cri)         throws GDSException     {        synchronized (db)        {            if (db != null && !db.hasTransactions())            {                gds.isc_detach_database(db);            }        }    }