Merge branch '5.2.x'
# Conflicts: # build.gradle
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -58,10 +58,10 @@ import org.springframework.util.ClassUtils;
|
||||
* way to set up a shared Hibernate SessionFactory in a Spring application context; the
|
||||
* SessionFactory can then be passed to data access objects via dependency injection.
|
||||
*
|
||||
* <p>Compatible with Hibernate 5.0/5.1 as well as 5.2/5.3, as of Spring 5.1.
|
||||
* Set up with Hibernate 5.3, {@code LocalSessionFactoryBean} is an immediate alternative
|
||||
* <p>Compatible with Hibernate 5.0/5.1 as well as 5.2/5.3/5.4, as of Spring 5.2.
|
||||
* Set up with Hibernate 5.2+, {@code LocalSessionFactoryBean} is an immediate alternative
|
||||
* to {@link org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean} for common
|
||||
* JPA purposes: In particular with Hibernate 5.3, the Hibernate {@code SessionFactory}
|
||||
* JPA purposes: In particular with Hibernate 5.3/5.4, the Hibernate {@code SessionFactory}
|
||||
* will natively expose the JPA {@code EntityManagerFactory} interface as well, and
|
||||
* Hibernate {@code BeanContainer} integration will be registered out of the box.
|
||||
* In combination with {@link HibernateTransactionManager}, this naturally allows for
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -76,12 +76,12 @@ import org.springframework.util.ClassUtils;
|
||||
* Typically combined with {@link HibernateTransactionManager} for declarative
|
||||
* transactions against the {@code SessionFactory} and its JDBC {@code DataSource}.
|
||||
*
|
||||
* <p>Compatible with Hibernate 5.0/5.1 as well as 5.2/5.3, as of Spring 5.1.
|
||||
* Set up with Hibernate 5.2/5.3, this builder is also a convenient way to set up
|
||||
* <p>Compatible with Hibernate 5.0/5.1 as well as 5.2/5.3/5.4, as of Spring 5.2.
|
||||
* Set up with Hibernate 5.2+, this builder is also a convenient way to set up
|
||||
* a JPA {@code EntityManagerFactory} since the Hibernate {@code SessionFactory}
|
||||
* natively exposes the JPA {@code EntityManagerFactory} interface as well now.
|
||||
*
|
||||
* <p>This builder supports Hibernate 5.3 {@code BeanContainer} integration,
|
||||
* <p>This builder supports Hibernate 5.3/5.4 {@code BeanContainer} integration,
|
||||
* {@link MetadataSources} from custom {@link BootstrapServiceRegistryBuilder}
|
||||
* setup, as well as other advanced Hibernate configuration options beyond the
|
||||
* standard JPA bootstrap contract.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -63,7 +63,7 @@ import org.springframework.util.ConcurrentReferenceHashMap;
|
||||
*
|
||||
* Please note that Spring's {@link LocalSessionFactoryBean} is an immediate alternative
|
||||
* to {@link org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean} for common
|
||||
* JPA purposes: In particular with Hibernate 5.3, the Hibernate {@code SessionFactory}
|
||||
* JPA purposes: In particular with Hibernate 5.3/5.4, the Hibernate {@code SessionFactory}
|
||||
* will natively expose the JPA {@code EntityManagerFactory} interface as well, and
|
||||
* Hibernate {@code BeanContainer} integration will be registered out of the box.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -76,7 +76,7 @@ import org.springframework.util.ReflectionUtils;
|
||||
|
||||
/**
|
||||
* {@link org.springframework.orm.jpa.JpaDialect} implementation for
|
||||
* Hibernate EntityManager. Developed against Hibernate 5.1/5.2/5.3.
|
||||
* Hibernate EntityManager. Developed against Hibernate 5.1/5.2/5.3/5.4.
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
* @author Costin Leau
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -42,7 +42,7 @@ import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
* {@link org.springframework.orm.jpa.JpaVendorAdapter} implementation for Hibernate
|
||||
* EntityManager. Developed and tested against Hibernate 5.0, 5.1, 5.2 and 5.3;
|
||||
* EntityManager. Developed and tested against Hibernate 5.0, 5.1, 5.2, 5.3, 5.4;
|
||||
* backwards-compatible with Hibernate 4.3 at runtime on a best-effort basis.
|
||||
*
|
||||
* <p>Exposes Hibernate's persistence provider and EntityManager extension interface,
|
||||
@@ -92,7 +92,7 @@ public class HibernateJpaVendorAdapter extends AbstractJpaVendorAdapter {
|
||||
* JDBC Connection.
|
||||
* <p>See {@link HibernateJpaDialect#setPrepareConnection(boolean)} for details.
|
||||
* This is just a convenience flag passed through to {@code HibernateJpaDialect}.
|
||||
* <p>On Hibernate 5.1/5.2, this flag remains {@code true} by default like against
|
||||
* <p>On Hibernate 5.1+, this flag remains {@code true} by default like against
|
||||
* previous Hibernate versions. The vendor adapter manually enforces Hibernate's
|
||||
* new connection handling mode {@code DELAYED_ACQUISITION_AND_HOLD} in that case
|
||||
* unless a user-specified connection handling mode property indicates otherwise;
|
||||
@@ -155,9 +155,9 @@ public class HibernateJpaVendorAdapter extends AbstractJpaVendorAdapter {
|
||||
}
|
||||
|
||||
if (connectionReleaseOnClose) {
|
||||
// Hibernate 5.1/5.2: manually enforce connection release mode ON_CLOSE (the former default)
|
||||
// Hibernate 5.1+: manually enforce connection release mode ON_CLOSE (the former default)
|
||||
try {
|
||||
// Try Hibernate 5.2
|
||||
// Try Hibernate 5.2+
|
||||
AvailableSettings.class.getField("CONNECTION_HANDLING");
|
||||
jpaProperties.put("hibernate.connection.handling_mode", "DELAYED_ACQUISITION_AND_HOLD");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user