conn = ds.getConnection();
conn = getConnection();
   public int getNumberOfUnloadedReferences(long channelID) throws Exception   {      if (trace) { log.trace("getting number of unloaded references for channel [" + channelID + "]"); }            Connection conn = null;      PreparedStatement ps = null;      ResultSet rs = null;      TransactionWrapper wrap = new TransactionWrapper();            try      {         conn = ds.getConnection();                  ps = conn.prepareStatement(selectCountReferences);                  ps.setLong(1, channelID);                  rs = ps.executeQuery();                  rs.next();                  int count = rs.getInt(1);                  if (trace) { log.trace("There are " + count + " unloaded references"); }                  return count;      }      catch (Exception e)      {         wrap.exceptionOccurred();         throw e;      }      finally      {         if (rs != null)         {            try            {               rs.close();            }            catch (Throwable e)            {            }         }         if (ps != null)         {            try            {               ps.close();            }            catch (Throwable e)            {            }         }         if (conn != null)         {            try            {               conn.close();            }            catch (Throwable e)            {            }         }         wrap.end();      }   }