private ConfStoreConnection getConnection() { return connectionFactory.getConnection(); }
public V call() { boolean success = false; // in JTA, transaction is bigger than the session _cf.beginTransaction(); ConfStoreConnection conn = getConnection(); try { V r = call(conn); _cf.commitTransaction(); success = true; return r; } finally { if (!success) try { _cf.rollbackTransaction(); } catch (Exception ex) { __log.error("DbError", ex); } } // session is closed automatically when committed or rolled back under JTA }
public V call() { boolean success = false; // in JTA, transaction is bigger than the session connectionFactory.beginTransaction(); ConfStoreConnection conn = getConnection(); try { V r = call(conn); connectionFactory.commitTransaction(); success = true; return r; } finally { if (!success) { try { connectionFactory.rollbackTransaction(); } catch (Exception ex) { log.error("DbError", ex); } } } // session is closed automatically when committed or rolled back under JTA }
private ConfStoreConnection getConnection() { return _cf.getConnection(); }