closeConnection();
  private void listComment(Integer userId)   {    ResultSet rs = null;    String date, comment;    int authorId;          try     {      conn.setAutoCommit(false);	// faster if made inside a Tx      // Try to find the comment corresponding to the user      try      {        stmt = conn.prepareStatement("SELECT * FROM comments WHERE to_user_id=?");        stmt.setInt(1, userId.intValue());        rs = stmt.executeQuery();      }      catch (Exception e)      {        sp.printHTML("Failed to execute Query for list of comments: " +e);        closeConnection();        return;      }      if (!rs.first())       {        sp.printHTML("<br>");        sp.printHTMLHighlighted("<h3>There is no comment yet for this user.</h3>");        sp.printHTML("<br>");        return;      }      else        sp.printHTML("<br><hr><br><h3>Comments for this user</h3><br>");      sp.printCommentHeader();      // Display each comment and the name of its author      do       {        comment = rs.getString("comment");        date = rs.getString("date");        authorId = rs.getInt("from_user_id");        String authorName = "none";	ResultSet authorRS = null;	try	{          stmt = conn.prepareStatement("SELECT nickname FROM users WHERE id=?");          stmt.setInt(1, authorId);          authorRS = stmt.executeQuery();          if (authorRS.first())            authorName = authorRS.getString("nickname");	}	catch (Exception e)	{          sp.printHTML("Failed to execute Query for the comment author: " +e);          closeConnection();          return;	}        sp.printComment(authorName, authorId, date, comment);      }      while (rs.next());      sp.printCommentFooter();      conn.commit();    }     catch (Exception e)     {      sp.printHTML("Exception getting comment list: " + e +"<br>");      try      {        conn.rollback();      }      catch (Exception se)       {        sp.printHTML("Transaction rollback failed: " + e +"<br>");      }      closeConnection();    }  }