好吧,看来一旦我们达到要求
tx.commit(),交易就已经提交了。我唯一的猜测是Hibernate
get()在访问对象时已经提交了事务。
解决方法很简单:
// commit only if tx still hasn't been committed yet (by hibernate)if (!tx.wasCommitted()) tx.commit();
欢迎分享,转载请注明来源:内存溢出
好吧,看来一旦我们达到要求
tx.commit(),交易就已经提交了。我唯一的猜测是Hibernate
get()在访问对象时已经提交了事务。
解决方法很简单:
// commit only if tx still hasn't been committed yet (by hibernate)if (!tx.wasCommitted()) tx.commit();
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)