358 } |
358 } |
359 connection.commit(); |
359 connection.commit(); |
360 } catch (SQLException ex) { |
360 } catch (SQLException ex) { |
361 LOG.warn("Database transaction failed (Code {}): {}", ex.getErrorCode(), ex.getMessage()); |
361 LOG.warn("Database transaction failed (Code {}): {}", ex.getErrorCode(), ex.getMessage()); |
362 LOG.debug("Details: ", ex); |
362 LOG.debug("Details: ", ex); |
363 resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Unhandled Transaction Error - Code:" + ex.getErrorCode()); |
363 resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Unhandled Transaction Error - Code: " + ex.getErrorCode()); |
364 connection.rollback(); |
364 connection.rollback(); |
365 } |
365 } |
366 } catch (SQLException ex) { |
366 } catch (SQLException ex) { |
367 LOG.error("Severe Database Exception (Code {}): {}", ex.getErrorCode(), ex.getMessage()); |
367 LOG.error("Severe Database Exception (Code {}): {}", ex.getErrorCode(), ex.getMessage()); |
368 LOG.debug("Details: ", ex); |
368 LOG.debug("Details: ", ex); |
369 resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Database Error - Code:" + ex.getErrorCode()); |
369 resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Database Error - Code: " + ex.getErrorCode()); |
370 } |
370 } |
371 } |
371 } |
372 |
372 |
373 @Override |
373 @Override |
374 protected final void doGet(HttpServletRequest req, HttpServletResponse resp) |
374 protected final void doGet(HttpServletRequest req, HttpServletResponse resp) |