stmt.close();
  public String getUserInfo(Integer userId) throws RemoteException  {    StringBuffer html = new StringBuffer();    Connection        conn = null;    PreparedStatement stmt = null;    ResultSet rs           = null;      // Try to find the user corresponding to the userId    try    {      conn = dataSource.getConnection();      stmt = conn.prepareStatement("SELECT * FROM users WHERE id=?");      stmt.setInt(1, userId.intValue());      rs = stmt.executeQuery();      stmt.close();    }    catch (SQLException e)    {      try      {        if (stmt != null) stmt.close();        if (conn != null) conn.close();      }      catch (Exception ignore)      {      }      throw new RemoteException("Failed to get user information from database: " +e);    }    try    {      if (rs.first())      {        String firstname = rs.getString("firstname");        String lastname = rs.getString("lastname");        String nickname = rs.getString("nickname");        String email = rs.getString("email");        String date = rs.getString("creation_date");        int rating = rs.getInt("rating");        html.append(getHTMLGeneralUserInformation(firstname, lastname, nickname, email, date, rating));        html.append(getComments(userId, conn));      }      else        html.append("This user does not exist!<br>");      conn.close();    }    catch (Exception e)    {      try      {        if (stmt != null) stmt.close();        if (conn != null) conn.close();      }      catch (Exception ignore)      {      }      throw new RemoteException("Cannot get user information (got exception: " +e+")<br>");    }    return html.toString();  }