Skip to content

Commit 351a729

Browse files
committed
Explicit javadoc reference to Hibernate 5.2
Issue: SPR-14393
1 parent 711eb99 commit 351a729

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

spring-orm-hibernate5/src/main/java/org/springframework/orm/hibernate5/LocalSessionFactoryBean.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,7 @@
5151
* Hibernate SessionFactory in a Spring application context; the SessionFactory can
5252
* then be passed to Hibernate-based data access objects via dependency injection.
5353
*
54-
* <p>This class is similar in role to the same-named class in the {@code orm.hibernate3}
55-
* package. However, in practice, it is closer to {@code AnnotationSessionFactoryBean}
56-
* since its core purpose is to bootstrap a {@code SessionFactory} from package scanning.
54+
* <p>Compatible with Hibernate 5.0/5.1 as well as 5.2, as of Spring 4.3.
5755
*
5856
* @author Juergen Hoeller
5957
* @since 4.2

spring-orm-hibernate5/src/main/java/org/springframework/orm/hibernate5/LocalSessionFactoryBuilder.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@
7070
* <p>This is designed for programmatic use, e.g. in {@code @Bean} factory methods.
7171
* Consider using {@link LocalSessionFactoryBean} for XML bean definition files.
7272
*
73+
* <p>Compatible with Hibernate 5.0/5.1 as well as 5.2, as of Spring 4.3.
74+
*
7375
* @author Juergen Hoeller
7476
* @since 4.2
7577
* @see LocalSessionFactoryBean
@@ -189,7 +191,7 @@ else if (jtaTransactionManager instanceof TransactionManager) {
189191
}
190192

191193
// Hibernate 5.2: manually enforce connection release mode AFTER_STATEMENT (the JTA default)
192-
getProperties().remove("hibernate.connection.handling_mode", "DELAYED_ACQUISITION_AND_RELEASE_AFTER_STATEMENT");
194+
getProperties().put("hibernate.connection.handling_mode", "DELAYED_ACQUISITION_AND_RELEASE_AFTER_STATEMENT");
193195

194196
return this;
195197
}

0 commit comments

Comments
 (0)