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

Incorrect value of Connection release mode for JDBCTransactionFactory

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 4.2.7
    • Fix Version/s: None
    • Component/s: None
    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

    • Suitable for new contributors:
      Yes, likely
    • Requires Release Note:
      Affirmative
    • Last commented by a user?:
      true
    • Sprint:

      Description

      The documentation says that for JDBCTransactionFactory, the default value of connection_release.mode is AFTER_TRANSACTION after release 3.1.
      We migrated from 3.6 to 4.2.7. Though in 3.6 it was correct, in 4.2.7 it is ON_CLOSE.

      https://docs.jboss.org/hibernate/orm/4.2/javadocs/org/hibernate/ConnectionReleaseMode.html

      here is the code snippet from class org.hibernate.engine.transaction.internal.jdbc.JdbcTransactionFactory
      public final class JdbcTransactionFactory implements TransactionFactory<JdbcTransaction> {
      @Override
      public JdbcTransaction createTransaction(TransactionCoordinator transactionCoordinator)

      { return new JdbcTransaction( transactionCoordinator ); }

      @Override
      public boolean canBeDriver()

      { return true; }

      @Override
      public ConnectionReleaseMode getDefaultReleaseMode()

      { return ConnectionReleaseMode.ON_CLOSE; }

        Attachments

          Issue links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: