简体   繁体   中英

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

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.

You can remove all properties. They are not necessary

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM