public String getItems(Integer categoryId, Integer regionId, int page, int nbOfItems)
public String getItems(Integer categoryId, Integer regionId, int page, int nbOfItems) throws RemoteException
  public String getItems(Integer categoryId, Integer regionId, int page, int nbOfItems)   {      Enumeration list;      ItemPK      itemPK;      ItemHome    iHome;      Item        item;      Query       query;      QueryHome   qHome;      String html = "";    try     {      qHome = (QueryHome)PortableRemoteObject.narrow(initialContext.lookup("java:comp/env/ejb/Query"), QueryHome.class);      query = qHome.create();    }     catch (Exception e)    {      throw new EJBException("Cannot lookup Query: " +e);    }    try     {      iHome = (ItemHome)PortableRemoteObject.narrow(initialContext.lookup("java:comp/env/ejb/Item"), ItemHome.class);    }     catch (Exception e)    {      throw new EJBException("Cannot lookup Item: " +e);    }    utx = sessionContext.getUserTransaction();    try     {      utx.begin();      list = query.getCurrentItemsInCategoryAndRegion(categoryId, regionId, page*nbOfItems, nbOfItems).elements();        while (list.hasMoreElements())         {          itemPK = (ItemPK)list.nextElement();          item = iHome.findByPrimaryKey(itemPK);          html = html.concat(printItem(item));        }      utx.commit();    }     catch (Exception e)    {      try      {        utx.rollback();        throw new EJBException("Cannot get items list: " +e);      }      catch (Exception se)       {        throw new EJBException("Transaction rollback failed: " + e);      }    }    return html;  }