throw new EJBException("Failed to executeQuery " +e);
throw new RemoteException("Failed to executeQuery " +e);
  public Vector getCurrentItemsInCategory(Integer categoryId, int startingRow, int nbOfRows) throws RemoteException  {    Connection        conn = null;    PreparedStatement stmt = null;    Vector v = new Vector(nbOfRows);    try     {      conn = dataSource.getConnection();      stmt = conn.prepareStatement("SELECT items.id FROM items WHERE items.category=? AND end_date>=NOW() LIMIT ?,?");      stmt.setInt(1, categoryId.intValue());      stmt.setInt(2, startingRow); // MySQL version      stmt.setInt(3, nbOfRows);    // MySQL version      ResultSet rs = stmt.executeQuery();      // Build the vector of primary keys      while (rs.next())       {        ItemPK iPK = new ItemPK(new Integer(rs.getInt("id")));        v.addElement((Object)iPK);      };    }    catch (SQLException e)    {      throw new EJBException("Failed to executeQuery " +e);    }    finally    {      try       {        if (stmt != null) stmt.close();	// close statement        if (conn != null) conn.close();	// release connection      }       catch (Exception ignore)       {      }    }    return v;  }