Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-905

Hibernate + Spring + JTA + Oracle 11g not working

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • jboss-fuse-6.0
    • jboss-fuse-6.0
    • None
    • None
    • % %

      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.

      Details on test case forthcoming.

              yfang@redhat.com Freeman(Yue) Fang
              rhn-support-sjavurek Susan Javurek
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: