提交 bcf19c4a authored 作者: Noel Grandin's avatar Noel Grandin

vmlens: fix race condition on Session.autoCommit

上级 88a81949
...@@ -440,7 +440,9 @@ public class JdbcConnection extends TraceObject implements Connection, ...@@ -440,7 +440,9 @@ public class JdbcConnection extends TraceObject implements Connection,
if (autoCommit && !session.getAutoCommit()) { if (autoCommit && !session.getAutoCommit()) {
commit(); commit();
} }
synchronized (session) {
session.setAutoCommit(autoCommit); session.setAutoCommit(autoCommit);
}
} catch (Exception e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论