catch (SQLException e)
catch (Exception e)
   public List messageRefs(Serializable storeID, Serializable channelID) throws Exception   {      if (log.isTraceEnabled()) { log.trace("Getting message references for channel " + channelID + " and store " + storeID); }      Connection conn = null;      PreparedStatement ps = null;      ResultSet rs = null;      TransactionWrapper wrap = new TransactionWrapper();      try      {         List result = new ArrayList();         conn = ds.getConnection();                     ps = conn.prepareStatement(selectChannelMessageRefs);         ps.setString(1, (String)channelID);         ps.setString(2, (String)storeID);                  rs = ps.executeQuery();         while (rs.next())         {            String id = rs.getString(1);                        result.add(id);         }                  if (log.isTraceEnabled()) { log.trace(JDBCUtil.statementToString(selectChannelMessageRefs, channelID) + " selected " + result.size() + " row(s)"); }         return result;      }      catch (SQLException 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();      }   }