Charlie's commit patch; if we're not in the auto-commit state, let Depot explicitly commit its operations. If we add transaction awareness to Depot in some future, this behaviour might become more subtle.

This commit is contained in:
Par Winzell
2009-09-03 22:12:44 +00:00
parent f9eb364c7f
commit 52a9c2036f
@@ -548,6 +548,10 @@ public class PersistenceContext
try {
// invoke our database operation
T value = op.invoke(this, conn, _liaison);
// if auto-commit is off and this is a write operation, push it through
if (!isReadOnly && !conn.getAutoCommit()) {
conn.commit();
}
// note the time it took to invoke this operation
_stats.noteOp(isReadOnly, preConnect, preInvoke, System.nanoTime());
// have the operation update any appropriate runtime statistics as well