3334353637383940414243
for (String statement : statements) { session.update(statement.trim(), data); } session.commit(); } catch (Exception e) { session.rollback(); throw e; } finally { session.close(); } }
4748495051525354555657
try { List<Object> objects = session.selectList(endpoint.getStatement(), null); session.commit(); return objects; } catch (Exception e) { session.rollback(); throw e; } finally { session.close(); } }
7778798081828384858687
} doProcessResult(exchange, result); session.commit(); } catch (Exception e) { session.rollback(); throw e; } finally { session.close(); } }
101102103104105106107108109110111
131132133134135136137138139140141
doProcessResult(exchange, result); } session.commit(); } catch (Exception e) { session.rollback(); throw e; } finally { session.close(); } }
157158159160161162163164165166167
187188189190191192193194195196197
217218219220221222223224225226227
8485868788899091929394
} // flush the batch statements and commit the database connection session.commit(); } catch (Exception e) { // discard the pending batch statements and roll the database connection back session.rollback(); throw e; } finally { // and finally close the session as we're done session.close(); }
8586878889909192939495