Skip to content

Commit a9e2040

Browse files
committed
HibernateJpaVendorAdapter properly checks connectionReleaseOnClose
Issue: SPR-16162
1 parent ffbaa26 commit a9e2040

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-orm/src/main/java/org/springframework/orm/jpa/vendor/HibernateJpaVendorAdapter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ else if (getDatabase() != null) {
172172
jpaProperties.put(Environment.SHOW_SQL, "true");
173173
}
174174

175-
if (this.jpaDialect.prepareConnection) {
175+
if (connectionReleaseOnClose) {
176176
// Hibernate 5.1/5.2: manually enforce connection release mode ON_CLOSE (the former default)
177177
try {
178178
// Try Hibernate 5.2

0 commit comments

Comments
 (0)