Hibernate + Spring + JTA + Oracle 11g not working with Fuse

Solution Verified - Updated -

Issue

We're seeing a problem with the transaction commits here. Hibernate fails to flush before the commit. If we manually flush, then everything works:

        public void add(DataPoint dp) {
                entityManager.persist( dp );
                entityManager.flush();   <=== add
        }

I tried playing with the auto-commits but this didn't help:

<property name="hibernate.connection.autocommit" value="true" />
<properties>
            <!--property name="hibernate.connection.driver_class" value="org.h2.Driver"/>
            <property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/-->

            <property name="hibernate.connection.driver_class" value="oracle.jdbc.OracleDriver"/>
            <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>

            <property name="hibernate.show_sql" value="false" />
            <!--property name="hibernate.hbm2ddl.auto" value="create-drop"/-->
            <property name="hibernate.hbm2ddl.auto" value="update" />
            <property name="hibernate.archive.autodetection" value="class"/>
            <property name="hibernate.connection.autocommit" value="true" />
        </properties>

Note, that using the H2 database everything works as expected.

Environment

  • JBoss Fuse 6.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.