blackboard.closeTransactionDontReset();
if (blackboard.isTransactionOpen()) { blackboard.closeTransactionDontReset(); }
  public void doGet(HttpServletRequest req,                    HttpServletResponse res) throws IOException {    //myOrg = getMyOrganization();    registeredRoles = getProviderRoles();    PrintWriter out = res.getWriter();    Collection col;    String start_date_string = req.getParameter(START_DATE_PARAMETER);    String end_date_string = req.getParameter(END_DATE_PARAMETER);    String role = req.getParameter(ROLE_PARAMETER);    String available = req.getParameter(AVAILABILITY_PARAMETER);    boolean isAvailable = true;    if (available != null) {      isAvailable = available.equals("available");    }    SimpleDateFormat dateFormat = new SimpleDateFormat("MM/dd/yyyy");    Date start_date = null;    Date end_date = null;    if (end_date_string != null) {      end_date = dateFormat.parse(end_date_string, new ParsePosition(0));    }    if (start_date_string != null) {      start_date = dateFormat.parse(start_date_string, new ParsePosition(0));    }    long now = currentTimeMillis();    printTitles(out);    printInfo(now, out);    try {      blackboard.openTransaction();      col = blackboard.query(availabilityPred);      blackboard.closeTransaction();      if (!col.isEmpty()) {        Iterator it = col.iterator();        AvailabilityChangeMessage message = (AvailabilityChangeMessage) it.next();        printChangeInfo(message, false, out);      } else {        if (end_date_string == null) {          printForm(req, out);        } else if (end_date == null) {          printError("Could not read date; try again.", out);          printForm(req, out);        } else if (end_date.getTime() < now) {          printError("End date must be in the future; try again.", out);          printForm(req, out);        } else {          AvailabilityChangeMessage message = new AvailabilityChangeMessage(Role.getRole(role),                                                                            false, new MutableTimeSpan(),                                                                            isAvailable);          blackboard.openTransaction();          blackboard.publishAdd(message);          blackboard.closeTransaction();          printChangeInfo(message, true, out);        }      }    } catch (Exception e) {      printError("Servlet error: " + e, out);    } finally {      blackboard.closeTransactionDontReset();      out.println("</body>");      out.flush();    }  }