We're updating the issue view to help you get more done. 

Incorrect value of Connection release mode for JDBCTransactionFactory

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;
}

Environment

None

Status

Assignee

Unassigned

Reporter

Eva Mukhija

Labels

Worked in

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Community Help Wanted

None

Suitable for new contributors

Yes, likely

Requires Release Note

Affirmative

Pull Request

None

backportDecision

None

backportReEvaluate

None

Affects versions

4.2.7

Priority

Major