提交 ba34cf88 authored 作者: andrei's avatar andrei

Proper syncronization on session to avoid concurrent connection usage

上级 35fb4131
...@@ -453,10 +453,10 @@ public class JdbcConnection extends TraceObject ...@@ -453,10 +453,10 @@ public class JdbcConnection extends TraceObject
debugCode("setAutoCommit(" + autoCommit + ");"); debugCode("setAutoCommit(" + autoCommit + ");");
} }
checkClosed(); checkClosed();
synchronized (session) {
if (autoCommit && !session.getAutoCommit()) { if (autoCommit && !session.getAutoCommit()) {
commit(); commit();
} }
synchronized (session) {
session.setAutoCommit(autoCommit); session.setAutoCommit(autoCommit);
} }
} catch (Exception e) { } catch (Exception e) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论