File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/main/java/org/apache/ibatis/executor Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,9 @@ public Transaction getTransaction() {
54
54
55
55
public void close (boolean forceRollback ) {
56
56
try {
57
- if (dirty ) { //issue #499. Unresolved session handling
57
+ //issue #499. Unresolved session handling
58
+ //issue #573. Autocommit sessions should commit
59
+ if (dirty && !autoCommit ) {
58
60
tcm .rollback ();
59
61
} else {
60
62
tcm .commit ();
@@ -155,7 +157,7 @@ private void flushCacheIfRequired(MappedStatement ms) {
155
157
Cache cache = ms .getCache ();
156
158
if (cache != null ) {
157
159
if (ms .isFlushCacheRequired ()) {
158
- if (! autoCommit ) dirty = true ; // issue #524. Disable using cached data for this session
160
+ dirty = true ; // issue #524. Disable using cached data for this session
159
161
tcm .clear (cache );
160
162
}
161
163
}
You can’t perform that action at this time.
0 commit comments