我想知道如何跟踪到底是什么代码导致了 WebSphere 中的以下警告。
WLTC0032W: One or more local transaction resources were rolled back during the cleanup of a LocalTransactionContainment.
在我们的应用程序中,我们有很多类,从中获取 JNDI 数据源并执行 SQL,我想知道是否有一种方法可以通过在测试环境中打开调试来准确定位导致此警告的类。我无法在 SystemErr.log 中找到异常堆栈跟踪。
最佳答案
该消息表明您执行了一些本地事务工作作为该遏制范围的一部分,但未提交。我建议两个选择:
1)提交本地事务
connection.commit();
2) 将数据源设置为自动提交
connection.setAutoCommit(true);
关于java - 跟踪 IBM WebSphere WLTC0032W : One or more local transaction resources were rolled back,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17041062/