本文介绍了如何解决JBOSS EAP 7.2中的JTA事务的hibernate.transaction.flush_before_completion问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们最近已从JBOSS EAP 6.4(JEE 6)迁移到JBOSS EAP 7.2(JEE 8).在新版本的EAP中,我们面临CMT交易的问题.在我们显式添加方法调用entityManager.flush()之前,刷新不起作用.

We have recently migrated from JBOSS EAP 6.4 (JEE 6) to JBOSS EAP 7.2 (JEE 8). In the new version of EAP we are facing issues with the CMT transactions. The flush is not working until we explicitly add the method call entityManager.flush().

在旧的EAP服务器中,相同的配置运行良好.新版本的容器在提交事务期间不会刷新SQL查询.

The same configuration was working fine in the old EAP server. The new version of container is not flushing the SQL queries during the commit of the transaction.

我们在persistence.xml中设置了以下属性.

We have setup the following properties in the persistence.xml.

<persistence-unit name="ACCOUNT" transaction-type="JTA">
<property name="hibernate.transaction.flush_before_completion"      value="true" />
<property name="hibernate.transaction.auto_close_session"           value="true" />         
<property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.JBossAppServerJtaPlatform" />

我们希望容器刷新SQL查询,我们不希望添加手动刷新方法调用.

We expect the container to flush the sql queries, we would not want to add the manual flush method calls.

如果有人遇到此类问题,请帮助我们.我们如何在EAP 7.2服务器中解决此问题?感谢您的关注.

Please help us if anybody went through this kind of issue. How can we fix this in EAP 7.2 server? Thanks for looking into it.

推荐答案

您可以删除所有属性.它们不是必需的

You can remove all properties. They are not necessary

这篇关于如何解决JBOSS EAP 7.2中的JTA事务的hibernate.transaction.flush_before_completion问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-31 06:11