Uploaded image for project: 'Hibernate ORM'
  1. HHH-10942

Session not flushing starting from 5.2.0 in Karaf + Aries JPA & JTA

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 5.2.0, 5.2.1
    • Fix Version/s: 5.2.2
    • Component/s: hibernate-core
    • Labels:
      None
    • Environment:
    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

    • Last commented by a user?:
      true
    • Sprint:

      Description

      After org.hibernate.jpa.internal.EntityManagerImpl were moved into org.hibernate.internal. SessionImpl in release 5.2.0 session doesn't flush because SessionImpl.close() session now releasing JDBC resources even if transaction in progress.
      in 5.1.0 EntityManagerImpl.close() method entity manager looks like this:

      EntityManagerImpl.java
      public void checkOpen(boolean markForRollbackIfClosed) {
              if(!this.isOpen()) {
                  if(markForRollbackIfClosed) {
                      this.markForRollbackOnly();
                  }
      
                  throw new IllegalStateException("EntityManager is closed");
              }
          }
      

      as you might see - session not closing when there is active transaction, but now it close explicitly

      i think it's need to add the same logic into SessionImpl.close() method or return old class.

      i attach logs with old behaviour (5.1.0.FINAL) and new (5.2.1.FINAL)
      and screenshots where i emphasize problem

        Attachments

        1. 5.1.log
          42 kB
        2. 5.1 with comment.jpg
          1.43 MB
        3. 5.2.log
          30 kB
        4. 5.2 with comment.jpg
          1.52 MB
        5. installed_bundles.jpg
          658 kB

          Issue links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: