提交 21c32693 编写于 作者: 公众号-芋道源码's avatar 公众号-芋道源码

修改 AbstractConnectionAdapter 的 #commit(),解决 某个 connection commit 异常时,后面的 connection 不执行 commit

上级 c96a91e7
......@@ -63,9 +63,15 @@ public abstract class AbstractConnectionAdapter extends AbstractUnsupportedOpera
@Override
public final void commit() throws SQLException {
Collection<SQLException> exceptions = new LinkedList<>();
for (Connection each : getConnections()) {
each.commit();
try {
each.commit();
} catch (final SQLException ex) {
exceptions.add(ex);
}
}
throwSQLExceptionIfNecessary(exceptions);
}
@Override
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册