waitingToClose.add(db); }
if (!waitingToClose.contains(db)) { waitingToClose.add(db); } return; }
    void releaseDbHandle(isc_db_handle db, FBConnectionRequestInfo cri)         throws GDSException     {        if (db == null)         {            throw new IllegalArgumentException("Attempt to release a null db handle!");        } // end of if ()                synchronized (db)        {            LinkedList freeDbHandles = null;            synchronized(criToFreeDbHandlesMap)            {                freeDbHandles = (LinkedList)criToFreeDbHandlesMap.get(cri);            }            if (freeDbHandles != null)             {                synchronized(freeDbHandles)                {                    freeDbHandles.remove(db);                 } // end of if ()            }            if (db.hasTransactions())            {                synchronized (waitingToClose)                {                    //double synchronization, but saves some ugly synch wrappers.                    if (!waitingToClose.contains(db))                     {                        waitingToClose.add(db);                    } // end of if ()                }            }            else            {                waitingToClose.remove(db);                gds.isc_detach_database(db);            }        }    }