throw new EJBException("Authentication failed: " +e);
throw new RemoteException("Authentication failed: " +e);
  public String getBuyNowForm(Integer itemId, String username, String password)   {    int userId = -1;    String html = "";    // Authenticate the user who want to comment      if ((username != null && username !="") || (password != null && password !=""))      {        SB_AuthHome authHome = null;        SB_Auth auth = null;        try         {          authHome = (SB_AuthHome)PortableRemoteObject.narrow(initialContext.lookup("java:comp/env/ejb/SB_Auth"), SB_AuthHome.class);          auth = authHome.create();        }         catch (Exception e)        {          throw new EJBException("Cannot lookup SB_Auth: " +e);        }        try         {          userId = auth.authenticate(username, password);        }         catch (Exception e)        {          throw new EJBException("Authentication failed: " +e);        }        if (userId == -1)        {           html = (" You don't have an account on RUBiS!<br>You have to register first.<br>");           return html;        }      }      // Try to find the Item corresponding to the Item ID      ItemHome itemHome;      try       {        itemHome = (ItemHome)PortableRemoteObject.narrow(initialContext.lookup("java:comp/env/ejb/Item"),                                                         ItemHome.class);      }       catch (Exception e)      {        throw new EJBException("Cannot lookup Item: " +e+"<br>");      }      try      {        Item item = itemHome.findByPrimaryKey(new ItemPK(itemId));        // Display the form for buying the item        html = printItemDescriptionToBuyNow(item, userId);      }       catch (Exception e)       {        throw new EJBException("Exception getting the item information: "+ e +"<br>");      }     return html;  }