331332333334335336337338339340341
} try { return executor.execute(getEntityManager()); } finally { if (beganTxn) { context.closeTxn(readOnly); } } } public static interface Executor<T> {
4142434445464748495051
logger.debug("Done with execution of ServletRequest"); } finally { logger.debug("Closing context and transaction"); if (context.isTxnOpen()) { context.closeTxn(true); } context.close(); logger.debug("Closed context and transaction"); } }
2930313233343536373839
super.run(); } catch(Exception e) { e.printStackTrace(); } finally { if (context.isTxnOpen()) { context.closeTxn(true); } context.close(); } } };