From 2bd500bb009d794b6b7dd5b3472eee6985847a07 Mon Sep 17 00:00:00 2001 From: Gavin King Date: Tue, 3 Dec 2024 08:50:53 +0100 Subject: [PATCH 1/2] update migration guide to reflect removal of Vibur + Proxool --- migration-guide.adoc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/migration-guide.adoc b/migration-guide.adoc index f1333ec22697..7c94b2be7b98 100644 --- a/migration-guide.adoc +++ b/migration-guide.adoc @@ -433,6 +433,12 @@ This was incorrect according to the JPA specification, and inconsistent with the In Hibernate 7, these SQL `UPDATE` statements only occur if the `@OrderColumn` is _not_ also mapped by a field of the entity. +[[pools]] +== Connection pools + +Since Vibur and Proxool are no longer actively developed, support for these connection pools was removed. +Use Agroal or HikariCP instead. + [[cleanup]] == Cleanup @@ -453,6 +459,7 @@ In Hibernate 7, these SQL `UPDATE` statements only occur if the `@OrderColumn` i ** Removed `@LazyCollection` ** Replaced uses of `CacheModeType` with `CacheMode` ** Removed `@TestForIssue` (for testing purposes) -> use `org.hibernate.testing.orm.junit.JiraKey` and `org.hibernate.testing.orm.junit.JiraKeyGroup` +** Removed `@Cache.include` -> use `@Cache.includeLazy` * Classes/interfaces ** Removed `SqmQualifiedJoin` (all joins are qualified) From bbd372e9e2c3125792cfd4c42ecd0735bcf69ced Mon Sep 17 00:00:00 2001 From: Gavin King Date: Tue, 3 Dec 2024 08:51:51 +0100 Subject: [PATCH 2/2] add links to connection pool doc --- .../src/main/asciidoc/introduction/Tuning.adoc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/documentation/src/main/asciidoc/introduction/Tuning.adoc b/documentation/src/main/asciidoc/introduction/Tuning.adoc index 0938cc5133ad..ce7be939e810 100644 --- a/documentation/src/main/asciidoc/introduction/Tuning.adoc +++ b/documentation/src/main/asciidoc/introduction/Tuning.adoc @@ -33,7 +33,7 @@ the connection pool. === Tuning the connection pool The connection pool built in to Hibernate is suitable for testing, but isn't intended for use in production. -Instead, Hibernate supports a range of different connection pools, including our favorite, Agroal. +Instead, Hibernate supports several different connection pools, including our favorite, Agroal. To select and configure Agroal, you'll need to set some extra configuration properties, in addition to the settings we already saw in <>. Properties with the prefix `hibernate.agroal` are passed through to Agroal: @@ -48,7 +48,7 @@ hibernate.agroal.reapTimeout PT10s ---- As long as you set at least one property with the prefix `hibernate.agroal`, the `AgroalConnectionProvider` will be selected automatically. -There are many to choose from: +There are many to choose from, as enumerated by link:{doc-javadoc-url}/org/hibernate/cfg/AgroalSettings.html[`AgroalSettings`]: .Settings for configuring Agroal [%breakable,cols="37,~"] @@ -72,10 +72,13 @@ The following settings are common to all connection pools supported by Hibernate .Common settings for connection pools [%breakable,cols="37,~"] |=== -| `hibernate.connection.autocommit` | The default autocommit mode -| `hibernate.connection.isolation` | The default transaction isolation level +| link:{doc-javadoc-url}/org/hibernate/cfg/JdbcSettings.html#AUTOCOMMIT[`hibernate.connection.autocommit`] | The default autocommit mode +| link:{doc-javadoc-url}/org/hibernate/cfg/JdbcSettings.html#ISOLATION[`hibernate.connection.isolation`] | The default transaction isolation level |=== +A popular alternative to Agroal is HikariCP. +Its setting are enumerated by link:{doc-javadoc-url}/org/hibernate/cfg/HikariCPSettings.html[`HikariCPSettings`]. + .Container-managed datasources **** In a container environment, you usually don't need to configure a connection pool through Hibernate.