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

calls to EntityTransaction.rollback() should be ignored if the LogicalConnection.physicalConnection is null or the LogicalConnection.physicalConnection.getAutoCommit() returns true

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.3.0.CR1
    • Fix Version/s: 5.2.17, 5.3.0.CR2
    • Component/s: hibernate-core
    • Labels:
      None
    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

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

      Description

      I'm seeing the following error be thrown when the EntityTransaction is marked to rollback only and the LogicalConnection.physicalConnection is null. As per our discussion, we should ignore the EntityTransaction.rollback() if the LogicalConnection.physicalConnection.getAutoCommit() returns true. Seems to me that we should also ignore the rollback() call if LogicalConnection.physicalConnection is null, as it makes no sense to me, that we would get a new DB connection just to see if it's autocommit flag defaults to true.

      org.hibernate.TransactionException: Unable to rollback against JDBC Connection
      [javatest.batch] at org.hibernate.resource.jdbc.internal.AbstractLogicalConnectionImplementor.rollback(AbstractLogicalConnectionImplementor.java:122)
      [javatest.batch] at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.rollback(JdbcResourceLocalTransactionCoordinatorImpl.java:286)
      [javatest.batch] at org.hibernate.engine.transaction.internal.TransactionImpl.rollback(TransactionImpl.java:125)

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: