throw new EJBException("Transaction rollback failed: " + e +"<br>");
throw new RemoteException("Transaction rollback failed: " + e +"<br>");
  public void createBuyNow(Integer itemId, Integer userId, int qty)  {    utx = sessionContext.getUserTransaction();    // Try to find the Item corresponding to the Item ID    Item item;    try     {      utx.begin();      ItemHome itemHome = (ItemHome)PortableRemoteObject.narrow(initialContext.lookup("java:comp/env/ejb/Item"),                                                                ItemHome.class);      item = itemHome.findByPrimaryKey(new ItemPK(itemId));      item.setQuantity(item.getQuantity() - qty);      if (item.getQuantity() == 0)        item.setEndDate(TimeManagement.currentDateToString());    }     catch (Exception e)    {      try      {        utx.rollback();        throw new EJBException("Cannot update Item: " +e+"<br>");      }      catch (Exception se)       {        throw new EJBException("Transaction rollback failed: " + e +"<br>");      }    }    try    {      BuyNowHome bHome = (BuyNowHome)PortableRemoteObject.narrow(initialContext.lookup("java:comp/env/ejb/BuyNow"),                                                      BuyNowHome.class);      edu.rice.rubis.beans.BuyNow b = bHome.create(userId, itemId, qty);           utx.commit();    }    catch (Exception e)    {      try      {        utx.rollback();        throw new EJBException("Error while storing the comment (got exception: " +e+")<br>");      }      catch (Exception se)       {        throw new EJBException("Transaction rollback failed: " + e +"<br>");      }    }		  }