How to fix hibernate.transaction.flush_before_completion issue with JTA transactions in JBOSS EAP 7.2?

左心房为你撑大大i 提交于 2020-01-14 04:04:27

问题


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().

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.

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" />

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

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.


回答1:


You can remove all properties. They are not necessary



来源:https://stackoverflow.com/questions/56687918/how-to-fix-hibernate-transaction-flush-before-completion-issue-with-jta-transact

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!