Issue Type: Bug Bug
Affects Versions: 4.1.4
Assignee: Unassigned
Components: core
Created: 26/Jun/12 9:28 PM
Description:

JdbcTransactionFactory does this:

public ConnectionReleaseMode getDefaultReleaseMode() { return ConnectionReleaseMode.ON_CLOSE; }

This seems to be a mistake because:

1) In section 13.5. Connection release modes of the 4.1.4.Final Core Reference Manual it says:

for JDBCTransactionFactory, [org.hibernate.transaction.TransactionFactory.getDefaultReleaseMode()] returns ConnectionReleaseMode.AFTER_TRANSACTION

2) In ConnectionReleaseMode.java it says:

/**

  • Indicates that JDBC connections should be released after each transaction
  • ends (works with both JTA-registered synch and HibernateTransaction API).
  • This mode may not be used with an application server JTA datasource.
  • <p/>
  • This is the default mode starting in 3.1; was previously {@link #ON_CLOSE}.
    */
    AFTER_TRANSACTION("after_transaction"),

You can work around this by setting hibernate.connection.release_mode=after_transaction

Environment: 4.1.4.Final
Project: Hibernate ORM
Priority: Minor Minor
Reporter: Sam Donnelly
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira