Mantis - Resin
Viewing Issue Advanced Details
6246 minor always 05-19-19 23:38 06-18-19 14:21
nam  
ferg  
normal  
closed 4.0.61  
no change required  
none    
none  
0006246: add hibernate property to persistence.xml for Hibernate 4 JTA support
Hibernate 4 requires the user to set the "hibernate.transaction.jta.platform" property when using the JTA transaction-type. Resin should automatically set that property if it detects:

1. transaction-type i JTA
2. provider is org.hibernate.ejb.HibernatePersistence (Hibernate 4)

<persistence>
    <persistence-unit name="books" transaction-type="JTA">
        <provider>org.hibernate.ejb.HibernatePersistence</provider>
            <properties>
                <property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.ResinJtaPlatform"/>


[1] http://docs.jboss.org/hibernate/orm/4.1/devguide/en-US/html_single/#services-JtaPlatform [^]

For Hibernate 4, it is: org.hibernate.service.jta.platform.internal.ResinJtaPlatform
For Hibernate 5, it is: org.hibernate.engine.transaction.jta.platform.internal.ResinJtaPlatform
For Hibernate 5, the short form is just Resin: <property name="hibernate.transaction.jta.platform" value="Resin"/>

Notes
(0006904)
ferg   
06-18-19 14:21   
Not part of the JPA spec.