From 30c15ce002dda36a7293c7b800b6ef8dd6c87c55 Mon Sep 17 00:00:00 2001 From: Gavin King Date: Sat, 30 Nov 2024 17:26:48 +0100 Subject: [PATCH 1/2] HHH-18902 completely remove Proxool it has not been updated in 20 years! --- documentation/documentation.gradle | 12 - .../asciidoc/quickstart/guides/obtaining.adoc | 1 - .../chapters/jdbc/Database_Access.adoc | 45 +-- etc/hibernate.properties | 17 -- etc/hibernate.properties.template | 17 -- .../java/org/hibernate/cfg/JdbcSettings.java | 2 +- .../org/hibernate/cfg/ProxoolSettings.java | 40 --- .../internal/ConnectionProviderInitiator.java | 9 - hibernate-platform/hibernate-platform.gradle | 2 - hibernate-proxool/hibernate-proxool.gradle | 28 -- .../internal/ProxoolConnectionProvider.java | 271 ------------------ .../internal/ProxoolMessageLogger.java | 72 ----- .../StrategyRegistrationProviderImpl.java | 37 --- .../proxool/internal/package-info.java | 11 - ...stry.selector.StrategyRegistrationProvider | 13 - .../OSGI-INF/blueprint/blueprint.xml | 16 -- .../ProxoolConnectionProviderTest.java | 66 ----- ...ProxoolTransactionIsolationConfigTest.java | 57 ---- .../src/test/resources/hibernate.properties | 24 -- .../src/test/resources/log4j2.properties | 19 -- .../src/test/resources/pool-one.properties | 13 - .../src/test/resources/pool-two.properties | 13 - settings.gradle | 3 - 23 files changed, 7 insertions(+), 781 deletions(-) delete mode 100644 hibernate-core/src/main/java/org/hibernate/cfg/ProxoolSettings.java delete mode 100644 hibernate-proxool/hibernate-proxool.gradle delete mode 100644 hibernate-proxool/src/main/java/org/hibernate/proxool/internal/ProxoolConnectionProvider.java delete mode 100644 hibernate-proxool/src/main/java/org/hibernate/proxool/internal/ProxoolMessageLogger.java delete mode 100644 hibernate-proxool/src/main/java/org/hibernate/proxool/internal/StrategyRegistrationProviderImpl.java delete mode 100644 hibernate-proxool/src/main/java/org/hibernate/proxool/internal/package-info.java delete mode 100644 hibernate-proxool/src/main/resources/META-INF/services/org.hibernate.boot.registry.selector.StrategyRegistrationProvider delete mode 100644 hibernate-proxool/src/main/resources/OSGI-INF/blueprint/blueprint.xml delete mode 100644 hibernate-proxool/src/test/java/org/hibernate/test/proxool/ProxoolConnectionProviderTest.java delete mode 100644 hibernate-proxool/src/test/java/org/hibernate/test/proxool/ProxoolTransactionIsolationConfigTest.java delete mode 100644 hibernate-proxool/src/test/resources/hibernate.properties delete mode 100644 hibernate-proxool/src/test/resources/log4j2.properties delete mode 100644 hibernate-proxool/src/test/resources/pool-one.properties delete mode 100644 hibernate-proxool/src/test/resources/pool-two.properties diff --git a/documentation/documentation.gradle b/documentation/documentation.gradle index 678e848e382a..32d2d6db9068 100644 --- a/documentation/documentation.gradle +++ b/documentation/documentation.gradle @@ -52,7 +52,6 @@ configurations { agroal c3p0 hikaricp - proxool vibur jcache @@ -72,7 +71,6 @@ configurations { extendsFrom agroal extendsFrom c3p0 extendsFrom hikaricp - extendsFrom proxool extendsFrom vibur extendsFrom jcache extendsFrom jpamodelgen @@ -133,7 +131,6 @@ dependencies { reportAggregation project(':hibernate-hikaricp') reportAggregation project(':hibernate-jcache') reportAggregation project(':hibernate-micrometer') - reportAggregation project(':hibernate-proxool') reportAggregation project(':hibernate-spatial') reportAggregation project(':hibernate-vibur') reportAggregation project(':hibernate-ant') @@ -163,9 +160,6 @@ dependencies { hikaricp project( ':hibernate-hikaricp' ) javadocSources project( path: ':hibernate-hikaricp', configuration: 'javadocSources' ) - proxool project( ':hibernate-proxool' ) - javadocSources project( path: ':hibernate-proxool', configuration: 'javadocSources' ) - vibur project( ':hibernate-vibur' ) javadocSources project( path: ':hibernate-vibur', configuration: 'javadocSources' ) @@ -565,12 +559,6 @@ settingsDocumentation { description = "Settings related to integrating with the C3P0 Connection pool" settingsClassName "org.hibernate.cfg.C3p0Settings" } - proxool { - explicitPosition = 5 - summary = "Proxool Connection Pool Settings" - description = "Settings related to integrating with the Proxool Connection pool" - settingsClassName "org.hibernate.cfg.ProxoolSettings" - } transaction { explicitPosition = 6 summary = "Transaction Environment Settings" diff --git a/documentation/src/main/asciidoc/quickstart/guides/obtaining.adoc b/documentation/src/main/asciidoc/quickstart/guides/obtaining.adoc index f7d8ba1c2236..2d376b82b9c1 100644 --- a/documentation/src/main/asciidoc/quickstart/guides/obtaining.adoc +++ b/documentation/src/main/asciidoc/quickstart/guides/obtaining.adoc @@ -53,7 +53,6 @@ transitive dependencies based on the features being used or not. |hibernate-c3p0| Support for https://www.mchange.com/projects/c3p0/[C3P0] connection pooling |hibernate-hikaricp| Support for https://github.com/brettwooldridge/HikariCP/[HikariCP] connection pooling |hibernate-vibur| Support for https://www.vibur.org/[Vibur DBCP] connection pooling -|hibernate-proxool| Support for https://proxool.sourceforge.net/[Proxool] connection pooling |hibernate-ucp| Support for https://docs.oracle.com/en/database/oracle/oracle-database/23/jjucp/intro.html[Universal Connection Pool] connection pooling |hibernate-jcache| Integration with https://jcp.org/en/jsr/detail?id=107$$[JCache], allowing any compliant implementation as a second-level cache provider |hibernate-graalvm| Experimental extension to make it easier to compile applications as a https://www.graalvm.org/[GraalVM] native image diff --git a/documentation/src/main/asciidoc/userguide/chapters/jdbc/Database_Access.adoc b/documentation/src/main/asciidoc/userguide/chapters/jdbc/Database_Access.adoc index b8fafb17eb7e..1057f663919b 100644 --- a/documentation/src/main/asciidoc/userguide/chapters/jdbc/Database_Access.adoc +++ b/documentation/src/main/asciidoc/userguide/chapters/jdbc/Database_Access.adoc @@ -16,13 +16,12 @@ Hibernate will internally determine which `ConnectionProvider` to use based on t 1. If `hibernate.connection.provider_class` is set, it takes precedence 2. else if `hibernate.connection.datasource` is set -> <> 3. else if any setting prefixed by `hibernate.c3p0.` is set -> <> -4. else if any setting prefixed by `hibernate.proxool.` is set -> <> -5. else if any setting prefixed by `hibernate.hikari.` is set -> <> -6. else if any setting prefixed by `hibernate.vibur.` is set -> <> -7. else if any setting prefixed by `hibernate.agroal.` is set -> <> -8. else if any setting prefixed by `hibernate.oracleucp.` is set -> <> -9. else if `hibernate.connection.url` is set -> <> -10. else -> <> +4. else if any setting prefixed by `hibernate.hikari.` is set -> <> +5. else if any setting prefixed by `hibernate.vibur.` is set -> <> +6. else if any setting prefixed by `hibernate.agroal.` is set -> <> +7. else if any setting prefixed by `hibernate.oracleucp.` is set -> <> +8. else if `hibernate.connection.url` is set -> <> +9. else -> <> [[database-connectionprovider-datasource]] === Using DataSources @@ -72,38 +71,6 @@ Transaction isolation of the Connections is managed by the `ConnectionProvider` Any other settings prefixed with `hibernate.c3p0.`:: Will have the `hibernate.` portion stripped and be passed to c3p0. Any other settings prefixed with `c3p0.`:: Get passed to c3p0 as is. See https://www.mchange.com/projects/c3p0/#configuration[c3p0 configuration] -[[database-connectionprovider-proxool]] -=== Using Proxool - -[IMPORTANT] -==== -To use the Proxool integration, the application must include the `hibernate-proxool` module jar (as well as its dependencies) on the classpath. -==== - -Hibernate also provides support for applications to use https://proxool.sourceforge.net/[Proxool] connection pooling. - -Transaction isolation of the Connections is managed by the `ConnectionProvider` itself. See <>. - -[[database-connectionprovider-proxool-existing]] -==== Using existing Proxool pools - -Controlled by the `hibernate.proxool.existing_pool` setting. -If set to true, this ConnectionProvider will use an already existing Proxool pool by alias as indicated by the `hibernate.proxool.pool_alias` setting. - -[[database-connectionprovider-proxool-jaxp]] -==== Configuring Proxool via XML - -The `hibernate.proxool.xml` setting names a Proxool configuration XML file to be loaded as a classpath resource and loaded by Proxool's JAXPConfigurator. -See https://proxool.sourceforge.net/configure.html[proxool configuration]. -`hibernate.proxool.pool_alias` must be set to indicate which pool to use. - -[[database-connectionprovider-proxool-properties]] -==== Configuring Proxool via Properties - -The `hibernate.proxool.properties` setting names a Proxool configuration properties file to be loaded as a classpath resource and loaded by Proxool's `PropertyConfigurator`. -See https://proxool.sourceforge.net/configure.html[proxool configuration]. -`hibernate.proxool.pool_alias` must be set to indicate which pool to use. - [[database-connectionprovider-hikari]] === Using HikariCP diff --git a/etc/hibernate.properties b/etc/hibernate.properties index fcee8489cdb2..aa427fdec14a 100644 --- a/etc/hibernate.properties +++ b/etc/hibernate.properties @@ -217,22 +217,6 @@ hibernate.connection.pool_size 1 -############################## -### Proxool Connection Pool### -############################## - -## Properties for external configuration of Proxool - -hibernate.proxool.pool_alias pool1 - -## Only need one of the following - -#hibernate.proxool.existing_pool true -#hibernate.proxool.xml proxool.xml -#hibernate.proxool.properties proxool.properties - - - ################################# ### Plugin ConnectionProvider ### ################################# @@ -242,7 +226,6 @@ hibernate.proxool.pool_alias pool1 #hibernate.connection.provider_class org.hibernate.connection.DriverManagerConnectionProvider #hibernate.connection.provider_class org.hibernate.connection.DatasourceConnectionProvider #hibernate.connection.provider_class org.hibernate.connection.C3P0ConnectionProvider -#hibernate.connection.provider_class org.hibernate.connection.ProxoolConnectionProvider diff --git a/etc/hibernate.properties.template b/etc/hibernate.properties.template index b583a72c0d09..f42b7fd11f55 100644 --- a/etc/hibernate.properties.template +++ b/etc/hibernate.properties.template @@ -191,22 +191,6 @@ hibernate.connection.pool_size 1 -############################## -### Proxool Connection Pool### -############################## - -## Properties for external configuration of Proxool - -hibernate.proxool.pool_alias pool1 - -## Only need one of the following - -#hibernate.proxool.existing_pool true -#hibernate.proxool.xml proxool.xml -#hibernate.proxool.properties proxool.properties - - - ################################# ### Plugin ConnectionProvider ### ################################# @@ -217,7 +201,6 @@ hibernate.proxool.pool_alias pool1 #hibernate.connection.provider_class org.hibernate.connection.DatasourceConnectionProvider #hibernate.connection.provider_class org.hibernate.connection.C3P0ConnectionProvider #hibernate.connection.provider_class org.hibernate.connection.DBCPConnectionProvider -#hibernate.connection.provider_class org.hibernate.connection.ProxoolConnectionProvider diff --git a/hibernate-core/src/main/java/org/hibernate/cfg/JdbcSettings.java b/hibernate-core/src/main/java/org/hibernate/cfg/JdbcSettings.java index 65b453a95f9d..2fdb4f27ac89 100644 --- a/hibernate-core/src/main/java/org/hibernate/cfg/JdbcSettings.java +++ b/hibernate-core/src/main/java/org/hibernate/cfg/JdbcSettings.java @@ -19,7 +19,7 @@ * * @author Steve Ebersole */ -public interface JdbcSettings extends C3p0Settings, ProxoolSettings, AgroalSettings, HikariCPSettings { +public interface JdbcSettings extends C3p0Settings, AgroalSettings, HikariCPSettings { /** * Specifies a JTA {@link javax.sql.DataSource} to use for Connections. diff --git a/hibernate-core/src/main/java/org/hibernate/cfg/ProxoolSettings.java b/hibernate-core/src/main/java/org/hibernate/cfg/ProxoolSettings.java deleted file mode 100644 index 90b51eb6a7e9..000000000000 --- a/hibernate-core/src/main/java/org/hibernate/cfg/ProxoolSettings.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * SPDX-License-Identifier: LGPL-2.1-or-later - * Copyright Red Hat Inc. and Hibernate Authors - */ -package org.hibernate.cfg; - -/** - * @author Steve Ebersole - */ -public interface ProxoolSettings { - - /** - * A setting prefix used to indicate settings that target the hibernate-proxool integration - */ - String PROXOOL_CONFIG_PREFIX = "hibernate.proxool"; - - /** - * Proxool property to configure the Proxool provider using an XML ({@code /path/to/file.xml}) - */ - String PROXOOL_XML = "hibernate.proxool.xml"; - - /** - * Proxool property to configure the Proxool provider using a properties file - * ({@code /path/to/proxool.properties}) - */ - String PROXOOL_PROPERTIES = "hibernate.proxool.properties"; - - /** - * Proxool property to configure the Proxool Provider from an already existing pool - * ({@code true} / {@code false}) - */ - String PROXOOL_EXISTING_POOL = "hibernate.proxool.existing_pool"; - - /** - * Proxool property with the Proxool pool alias to use - * (Required for {@link #PROXOOL_EXISTING_POOL}, {@link #PROXOOL_PROPERTIES}, or - * {@link #PROXOOL_XML}) - */ - String PROXOOL_POOL_ALIAS = "hibernate.proxool.pool_alias"; -} diff --git a/hibernate-core/src/main/java/org/hibernate/engine/jdbc/connections/internal/ConnectionProviderInitiator.java b/hibernate-core/src/main/java/org/hibernate/engine/jdbc/connections/internal/ConnectionProviderInitiator.java index bc49ef61470c..d76e089deb49 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/jdbc/connections/internal/ConnectionProviderInitiator.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/jdbc/connections/internal/ConnectionProviderInitiator.java @@ -41,7 +41,6 @@ import static org.hibernate.cfg.JdbcSettings.POOL_SIZE; import static org.hibernate.cfg.JdbcSettings.URL; import static org.hibernate.cfg.JdbcSettings.USER; -import static org.hibernate.cfg.ProxoolSettings.PROXOOL_CONFIG_PREFIX; import static org.hibernate.cfg.SchemaToolingSettings.ENABLE_SYNONYMS; import static org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentImpl.isMultiTenancyEnabled; import static org.hibernate.internal.util.StringHelper.nullIfEmpty; @@ -66,11 +65,6 @@ public class ConnectionProviderInitiator implements StandardServiceInitiator. - */ - -description = 'Integration for Proxool Connection pooling into Hibernate O/RM' - -apply from: rootProject.file( 'gradle/relocated-published-java-module.gradle' ) - - -dependencies { - implementation project( ':hibernate-core' ) - implementation libs.proxool - - testImplementation project( ':hibernate-testing' ) -} - -test { - // Proxool needs this to define classes for some reason. Stack trace: - // at org.logicalcobwebs.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:372) - // at org.logicalcobwebs.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:193) - // at org.logicalcobwebs.cglib.core.KeyFactory$Generator.create(KeyFactory.java:177) - // at org.logicalcobwebs.cglib.core.KeyFactory.create(KeyFactory.java:149) - // at org.logicalcobwebs.cglib.proxy.Enhancer.(Enhancer.java:96) - jvmArgs( ['--add-opens', 'java.base/java.lang=ALL-UNNAMED'] ) -} \ No newline at end of file diff --git a/hibernate-proxool/src/main/java/org/hibernate/proxool/internal/ProxoolConnectionProvider.java b/hibernate-proxool/src/main/java/org/hibernate/proxool/internal/ProxoolConnectionProvider.java deleted file mode 100644 index d065190730fb..000000000000 --- a/hibernate-proxool/src/main/java/org/hibernate/proxool/internal/ProxoolConnectionProvider.java +++ /dev/null @@ -1,271 +0,0 @@ -/* - * SPDX-License-Identifier: LGPL-2.1-or-later - * Copyright Red Hat Inc. and Hibernate Authors - */ -package org.hibernate.proxool.internal; - -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.Reader; -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.SQLException; -import java.util.Map; -import java.util.Properties; - -import org.hibernate.HibernateException; -import org.hibernate.boot.registry.classloading.spi.ClassLoaderService; -import org.hibernate.cfg.JdbcSettings; -import org.hibernate.cfg.ProxoolSettings; -import org.hibernate.dialect.Dialect; -import org.hibernate.engine.jdbc.connections.internal.ConnectionProviderInitiator; -import org.hibernate.engine.jdbc.connections.internal.DatabaseConnectionInfoImpl; -import org.hibernate.engine.jdbc.connections.spi.ConnectionProvider; -import org.hibernate.engine.jdbc.connections.spi.DatabaseConnectionInfo; -import org.hibernate.internal.log.ConnectionInfoLogger; -import org.hibernate.service.UnknownUnwrapTypeException; -import org.hibernate.service.spi.Configurable; -import org.hibernate.service.spi.ServiceRegistryAwareService; -import org.hibernate.service.spi.ServiceRegistryImplementor; -import org.hibernate.service.spi.Stoppable; - -import org.logicalcobwebs.proxool.ConnectionPoolDefinitionIF; -import org.logicalcobwebs.proxool.ProxoolException; -import org.logicalcobwebs.proxool.ProxoolFacade; -import org.logicalcobwebs.proxool.configuration.JAXPConfigurator; -import org.logicalcobwebs.proxool.configuration.PropertyConfigurator; - -import static org.hibernate.internal.util.StringHelper.isNotEmpty; -import static org.hibernate.internal.util.config.ConfigurationHelper.getBoolean; -import static org.hibernate.proxool.internal.ProxoolMessageLogger.PROXOOL_MESSAGE_LOGGER; - -/** - * A connection provider that uses a Proxool connection pool. Hibernate will use this by - * default if the {@code hibernate.proxool.*} properties are set. - * - * @see ConnectionProvider - */ -public class ProxoolConnectionProvider - implements ConnectionProvider, Configurable, Stoppable, ServiceRegistryAwareService { - - private static final String PROXOOL_JDBC_STEM = "proxool."; - - private String proxoolPoolAlias; - private String proxoolAlias; - - // TRUE if the pool is borrowed from the outside, FALSE if we used to create it - private boolean existingPool; - - // Not null if the Isolation level has been specified in the configuration file. - // Otherwise, it is left to the Driver's default value. - private Integer isolation; - - private boolean autocommit; - - private ClassLoaderService classLoaderService; - - @Override - public Connection getConnection() throws SQLException { - // get a connection from the pool (through DriverManager, cfr. Proxool doc) - final Connection connection = DriverManager.getConnection( proxoolAlias ); - - // set the Transaction Isolation if defined - if ( isolation != null ) { - connection.setTransactionIsolation( isolation ); - } - - // toggle autoCommit to false if set - if ( connection.getAutoCommit() != autocommit ) { - connection.setAutoCommit( autocommit ); - } - - // return the connection - return connection; - } - - @Override - public boolean isUnwrappableAs(Class unwrapType) { - return ConnectionProvider.class.equals( unwrapType ) - || ProxoolConnectionProvider.class.isAssignableFrom( unwrapType ); - } - - @Override - @SuppressWarnings("unchecked") - public T unwrap(Class unwrapType) { - if ( ConnectionProvider.class.equals( unwrapType ) - || ProxoolConnectionProvider.class.isAssignableFrom( unwrapType ) ) { - return (T) this; - } - else { - throw new UnknownUnwrapTypeException( unwrapType ); - } - } - - @Override - public void closeConnection(Connection connection) throws SQLException { - connection.close(); - } - - @Override - public void injectServices(ServiceRegistryImplementor serviceRegistry) { - classLoaderService = serviceRegistry.getService( ClassLoaderService.class ); - } - - @Override - public void configure(Map props) { - ConnectionInfoLogger.INSTANCE.configureConnectionPool( "Proxool" ); - - // Get the configurator files (if available) - final String jaxpFile = (String) props.get( ProxoolSettings.PROXOOL_XML ); - final String propFile = (String) props.get( ProxoolSettings.PROXOOL_PROPERTIES ); - final String externalConfig = (String) props.get( ProxoolSettings.PROXOOL_EXISTING_POOL ); - - // Default the Proxool alias setting - proxoolAlias = proxoolPoolAlias = (String) props.get( ProxoolSettings.PROXOOL_POOL_ALIAS ); - - // Configured outside of Hibernate (i.e. Servlet container, or Java Bean Container - // already has Proxool pools running, and this provider is to just borrow one of these - if ( "true".equals( externalConfig ) ) { - // Validate that an alias name was provided to determine which pool to use - if ( !isNotEmpty( proxoolAlias ) ) { - final String msg = "Cannot configure Proxool Provider to use an existing in memory pool without the " + - ProxoolSettings.PROXOOL_POOL_ALIAS + " property set."; - throw new HibernateException( msg ); - } - // Append the stem to the proxool pool alias - proxoolAlias = PROXOOL_JDBC_STEM + proxoolAlias; - - // Set the existing pool flag to true - existingPool = true; - - PROXOOL_MESSAGE_LOGGER.configuringProxoolProviderUsingExistingPool( proxoolAlias ); - - // Configured using the JAXP Configurator - } - else if ( isNotEmpty( jaxpFile ) ) { - PROXOOL_MESSAGE_LOGGER.configuringProxoolProviderUsingJaxpConfigurator( jaxpFile ); - - // Validate that an alias name was provided to determine which pool to use - if ( !isNotEmpty( proxoolAlias ) ) { - final String msg = "Cannot configure Proxool Provider to use JAXP without the " + ProxoolSettings.PROXOOL_POOL_ALIAS + " property set."; - throw new HibernateException( msg ); - } - - try { - JAXPConfigurator.configure( getConfigStreamReader( jaxpFile ), false ); - } - catch (ProxoolException e) { - final String msg = "Proxool Provider unable to load JAXP configurator file: " + jaxpFile; - throw new HibernateException( msg, e ); - } - - // Append the stem to the proxool pool alias - proxoolAlias = PROXOOL_JDBC_STEM + proxoolAlias; - PROXOOL_MESSAGE_LOGGER.configuringProxoolProviderToUsePoolAlias( proxoolAlias ); - - // Configured using the Properties File Configurator - } - else if ( isNotEmpty( propFile ) ) { - PROXOOL_MESSAGE_LOGGER.configuringProxoolProviderUsingPropertiesFile( propFile ); - - // Validate that an alias name was provided to determine which pool to use - if ( !isNotEmpty( proxoolAlias ) ) { - final String msg = "Cannot configure Proxool Provider to use Properties File without the " + ProxoolSettings.PROXOOL_POOL_ALIAS + " property set."; - throw new HibernateException( msg ); - } - - try { - PropertyConfigurator.configure( getConfigProperties( propFile ) ); - } - catch (ProxoolException e) { - final String msg = "Proxool Provider unable to load Property configurator file: " + propFile; - throw new HibernateException( msg, e ); - } - - // Append the stem to the proxool pool alias - proxoolAlias = PROXOOL_JDBC_STEM + proxoolAlias; - PROXOOL_MESSAGE_LOGGER.configuringProxoolProviderToUsePoolAlias( proxoolAlias ); - } - - // Remember Isolation level - isolation = ConnectionProviderInitiator.extractIsolation( props ); - autocommit = getBoolean( JdbcSettings.AUTOCOMMIT, props ); - } - - private Reader getConfigStreamReader(String resource) { - return new InputStreamReader( classLoaderService.locateResourceStream( resource ) ); - } - - private Properties getConfigProperties(String resource) { - try { - Properties properties = new Properties(); - properties.load( classLoaderService.locateResourceStream( resource ) ); - return properties; - } - catch (IOException e) { - throw new HibernateException( "Unable to load properties from specified config file: " + resource, e ); - } - } - - @Override - public boolean supportsAggressiveRelease() { - return false; - } - - - @Override - public void stop() { - // If the provider was leeching off an existing pool don't close it - if ( existingPool ) { - return; - } - - // We have created the pool ourselves, so shut it down - ConnectionInfoLogger.INSTANCE.cleaningUpConnectionPool( "proxool" ); - try { - if ( ProxoolFacade.getAliases().length == 1 ) { - ProxoolFacade.shutdown( 0 ); - } - else { - ProxoolFacade.removeConnectionPool( proxoolAlias.substring( PROXOOL_JDBC_STEM.length() ) ); - } - } - catch (Exception e) { - // If you're closing down the ConnectionProvider chances are an - // is not a real big deal, just warn - ConnectionInfoLogger.INSTANCE.unableToDestroyConnectionPool( e ); - } - } - - @Override - public DatabaseConnectionInfo getDatabaseConnectionInfo(Dialect dialect) { - try { - final ConnectionPoolDefinitionIF cpd = ProxoolFacade.getConnectionPoolDefinition( proxoolPoolAlias ); - return new DatabaseConnectionInfoImpl( - cpd.getUrl(), - cpd.getDriver(), - dialect.getVersion(), - ConnectionProviderInitiator.toIsolationNiceName( isolation ), - Boolean.toString( autocommit ), - cpd.getMinimumConnectionCount(), - cpd.getMaximumConnectionCount() - ); - } - catch (ProxoolException e) { - PROXOOL_MESSAGE_LOGGER.warn( "Error while obtaining the database pool information", e ); - return new DatabaseConnectionInfoImpl( dialect ); - } - } - - /** - * Release all resources held by this provider. - * - * @throws HibernateException Indicates a problem closing the underlying pool or releasing resources - * - * @deprecated Use {@link #stop} instead - */ - @Deprecated - public void close() throws HibernateException { - stop(); - } -} diff --git a/hibernate-proxool/src/main/java/org/hibernate/proxool/internal/ProxoolMessageLogger.java b/hibernate-proxool/src/main/java/org/hibernate/proxool/internal/ProxoolMessageLogger.java deleted file mode 100644 index 07054861d516..000000000000 --- a/hibernate-proxool/src/main/java/org/hibernate/proxool/internal/ProxoolMessageLogger.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * SPDX-License-Identifier: LGPL-2.1-or-later - * Copyright Red Hat Inc. and Hibernate Authors - */ -package org.hibernate.proxool.internal; - -import org.hibernate.internal.log.ConnectionInfoLogger; -import org.hibernate.internal.log.SubSystemLogging; - -import org.jboss.logging.Logger; -import org.jboss.logging.annotations.LogMessage; -import org.jboss.logging.annotations.Message; -import org.jboss.logging.annotations.MessageLogger; -import org.jboss.logging.annotations.ValidIdRange; - -import java.lang.invoke.MethodHandles; - -import static org.jboss.logging.Logger.Level.DEBUG; - -/** - * The jboss-logging {@link MessageLogger} for the hibernate-proxool module. It reserves message ids ranging from - * 30001 to 35000 inclusively. - *

- * New messages must be added after the last message defined to ensure message codes are unique. - */ -@MessageLogger(projectCode = "HHH") -@ValidIdRange( min = 30001, max = 35000 ) -@SubSystemLogging( - name = ProxoolMessageLogger.LOGGER_NAME, - description = "Logs details related to Proxool connection pooling" -) -public interface ProxoolMessageLogger extends ConnectionInfoLogger { - String LOGGER_NAME = ConnectionInfoLogger.LOGGER_NAME + ".proxool"; - ProxoolMessageLogger PROXOOL_MESSAGE_LOGGER = Logger.getMessageLogger( MethodHandles.lookup(), ProxoolMessageLogger.class, LOGGER_NAME ); - - /** - * Logs the name of a named pool to be used for configuration information - * - * @param proxoolAlias The name (alias) of the proxool pool - */ - @LogMessage(level = DEBUG) - @Message(value = "Configuring Proxool to use pool alias: %s", id = 30002) - void configuringProxoolProviderToUsePoolAlias(String proxoolAlias); - - /** - * Logs the name of a named existing pool in memory to be used - * - * @param proxoolAlias The name (alias) of the proxool pool - */ - @LogMessage(level = DEBUG) - @Message(value = "Configuring Proxool using existing pool in memory: %s", id = 30003) - void configuringProxoolProviderUsingExistingPool(String proxoolAlias); - - /** - * Logs a message that the proxool pool will be built using its JAXP (XML) configuration mechanism - * - * @param jaxpFile The XML configuration file to use - */ - @LogMessage(level = DEBUG) - @Message(value = "Configuring Proxool using JAXPConfigurator: %s", id = 30004) - void configuringProxoolProviderUsingJaxpConfigurator(String jaxpFile); - - /** - * Logs a message that the proxool pool will be built using a properties file - * - * @param propFile The properties file to use - */ - @LogMessage(level = DEBUG) - @Message(value = "Configuring Proxool using properties file: %s", id = 30005) - void configuringProxoolProviderUsingPropertiesFile(String propFile); - -} diff --git a/hibernate-proxool/src/main/java/org/hibernate/proxool/internal/StrategyRegistrationProviderImpl.java b/hibernate-proxool/src/main/java/org/hibernate/proxool/internal/StrategyRegistrationProviderImpl.java deleted file mode 100644 index 150d7c32e777..000000000000 --- a/hibernate-proxool/src/main/java/org/hibernate/proxool/internal/StrategyRegistrationProviderImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * SPDX-License-Identifier: LGPL-2.1-or-later - * Copyright Red Hat Inc. and Hibernate Authors - */ -package org.hibernate.proxool.internal; - -import java.util.Collections; - -import org.hibernate.boot.registry.selector.SimpleStrategyRegistrationImpl; -import org.hibernate.boot.registry.selector.StrategyRegistration; -import org.hibernate.boot.registry.selector.StrategyRegistrationProvider; -import org.hibernate.engine.jdbc.connections.spi.ConnectionProvider; - -/** - * Provides the {@link ProxoolConnectionProvider} to the - * {@link org.hibernate.boot.registry.selector.spi.StrategySelector} service. - * - * @author Brett Meyer - */ -public final class StrategyRegistrationProviderImpl implements StrategyRegistrationProvider { - - @Override - @SuppressWarnings("unchecked") - public Iterable getStrategyRegistrations() { - return Collections.singletonList( - new SimpleStrategyRegistrationImpl( - ConnectionProvider.class, - ProxoolConnectionProvider.class, - "proxool", - ProxoolConnectionProvider.class.getSimpleName(), - // legacy - "org.hibernate.connection.ProxoolConnectionProvider", - // legacy - "org.hibernate.service.jdbc.connections.internal.ProxoolConnectionProvider" - ) ); - } -} diff --git a/hibernate-proxool/src/main/java/org/hibernate/proxool/internal/package-info.java b/hibernate-proxool/src/main/java/org/hibernate/proxool/internal/package-info.java deleted file mode 100644 index e59a1ea3256f..000000000000 --- a/hibernate-proxool/src/main/java/org/hibernate/proxool/internal/package-info.java +++ /dev/null @@ -1,11 +0,0 @@ -/* - * Hibernate, Relational Persistence for Idiomatic Java - * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . - */ - -/** - * Implementation of ConnectionProvider using the proxool Connection pool. - */ -package org.hibernate.proxool.internal; diff --git a/hibernate-proxool/src/main/resources/META-INF/services/org.hibernate.boot.registry.selector.StrategyRegistrationProvider b/hibernate-proxool/src/main/resources/META-INF/services/org.hibernate.boot.registry.selector.StrategyRegistrationProvider deleted file mode 100644 index e752debfb8a0..000000000000 --- a/hibernate-proxool/src/main/resources/META-INF/services/org.hibernate.boot.registry.selector.StrategyRegistrationProvider +++ /dev/null @@ -1,13 +0,0 @@ -# -# Hibernate, Relational Persistence for Idiomatic Java -# -# License: GNU Lesser General Public License (LGPL), version 2.1 or later. -# See the lgpl.txt file in the root directory or . -# -# -# Hibernate, Relational Persistence for Idiomatic Java -# -# License: GNU Lesser General Public License (LGPL), version 2.1 or later. -# See the lgpl.txt file in the root directory or . -# -org.hibernate.proxool.internal.StrategyRegistrationProviderImpl diff --git a/hibernate-proxool/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/hibernate-proxool/src/main/resources/OSGI-INF/blueprint/blueprint.xml deleted file mode 100644 index 6dd16f59511d..000000000000 --- a/hibernate-proxool/src/main/resources/OSGI-INF/blueprint/blueprint.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - diff --git a/hibernate-proxool/src/test/java/org/hibernate/test/proxool/ProxoolConnectionProviderTest.java b/hibernate-proxool/src/test/java/org/hibernate/test/proxool/ProxoolConnectionProviderTest.java deleted file mode 100644 index ed240906b99a..000000000000 --- a/hibernate-proxool/src/test/java/org/hibernate/test/proxool/ProxoolConnectionProviderTest.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * SPDX-License-Identifier: LGPL-2.1-or-later - * Copyright Red Hat Inc. and Hibernate Authors - */ -package org.hibernate.test.proxool; - -import java.util.Arrays; -import java.util.List; - -import org.junit.Test; -import org.logicalcobwebs.proxool.ProxoolFacade; - -import org.hibernate.boot.registry.StandardServiceRegistry; -import org.hibernate.boot.registry.StandardServiceRegistryBuilder; -import org.hibernate.cfg.Environment; -import org.hibernate.engine.jdbc.connections.spi.ConnectionProvider; -import org.hibernate.proxool.internal.ProxoolConnectionProvider; -import org.hibernate.testing.junit4.BaseUnitTestCase; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - -/** - * Test to verify connection pools are closed, and that only the managed one is closed. - * - * @author Sanne Grinovero - */ -public class ProxoolConnectionProviderTest extends BaseUnitTestCase { - - @Test - public void testPoolsClosed() { - assertDefinedPools(); // zero-length-vararg used as parameter - StandardServiceRegistry serviceRegistry = buildServiceRegistry( "pool-one" ); - ConnectionProvider providerOne = serviceRegistry.getService( ConnectionProvider.class ); - assertDefinedPools( "pool-one" ); - - - StandardServiceRegistry serviceRegistryTwo = buildServiceRegistry( "pool-two" ); - ConnectionProvider providerTwo = serviceRegistryTwo.getService( ConnectionProvider.class ); - assertDefinedPools( "pool-one", "pool-two" ); - - StandardServiceRegistryBuilder.destroy( serviceRegistry ); - assertDefinedPools( "pool-two" ); - - StandardServiceRegistryBuilder.destroy( serviceRegistryTwo ); - assertDefinedPools(); - } - - private void assertDefinedPools(String... expectedPoolNames) { - List aliases = Arrays.asList( ProxoolFacade.getAliases() ); - assertEquals( expectedPoolNames.length, aliases.size() ); - for (String poolName : expectedPoolNames) { - assertTrue( "pool named " + poolName + " missing", aliases.contains( poolName ) ); - } - } - - private StandardServiceRegistry buildServiceRegistry(String poolName){ - - return new StandardServiceRegistryBuilder( ) - .applySetting( Environment.PROXOOL_POOL_ALIAS, poolName ) - .applySetting( Environment.PROXOOL_PROPERTIES, poolName + ".properties" ) - .applySetting( Environment.CONNECTION_PROVIDER, ProxoolConnectionProvider.class.getName() ) - .build(); - - } -} diff --git a/hibernate-proxool/src/test/java/org/hibernate/test/proxool/ProxoolTransactionIsolationConfigTest.java b/hibernate-proxool/src/test/java/org/hibernate/test/proxool/ProxoolTransactionIsolationConfigTest.java deleted file mode 100644 index 318498642d50..000000000000 --- a/hibernate-proxool/src/test/java/org/hibernate/test/proxool/ProxoolTransactionIsolationConfigTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * SPDX-License-Identifier: LGPL-2.1-or-later - * Copyright Red Hat Inc. and Hibernate Authors - */ -package org.hibernate.test.proxool; - -import java.util.HashMap; -import java.util.Map; -import java.util.Properties; - -import org.hibernate.boot.registry.StandardServiceRegistry; -import org.hibernate.boot.registry.StandardServiceRegistryBuilder; -import org.hibernate.cfg.AvailableSettings; -import org.hibernate.dialect.TiDBDialect; -import org.hibernate.engine.jdbc.connections.spi.ConnectionProvider; -import org.hibernate.proxool.internal.ProxoolConnectionProvider; -import org.hibernate.service.spi.ServiceRegistryImplementor; - -import org.hibernate.testing.SkipForDialect; -import org.hibernate.testing.common.connections.BaseTransactionIsolationConfigTest; -import org.junit.Before; - -/** - * @author Steve Ebersole - */ -@SkipForDialect(value = TiDBDialect.class, comment = "Doesn't support SERIALIZABLE isolation") -public class ProxoolTransactionIsolationConfigTest extends BaseTransactionIsolationConfigTest { - private Map properties; - private StandardServiceRegistry ssr; - - @Before - public void setUp() { - String poolName = "pool-one"; - - properties = new HashMap<>(); - properties.put( AvailableSettings.PROXOOL_POOL_ALIAS, poolName ); - properties.put( AvailableSettings.PROXOOL_PROPERTIES, poolName + ".properties" ); - - ssr = new StandardServiceRegistryBuilder() - .applySettings( properties ) - .build(); - } - - @Override - protected ConnectionProvider getConnectionProviderUnderTest() { - ProxoolConnectionProvider provider = new ProxoolConnectionProvider(); - provider.injectServices( (ServiceRegistryImplementor) ssr ); - return provider; - } - - @Override - protected void augmentConfigurationSettings(Properties properties) { - super.augmentConfigurationSettings( properties ); - - properties.putAll( this.properties ); - } -} diff --git a/hibernate-proxool/src/test/resources/hibernate.properties b/hibernate-proxool/src/test/resources/hibernate.properties deleted file mode 100644 index b297114d5f0c..000000000000 --- a/hibernate-proxool/src/test/resources/hibernate.properties +++ /dev/null @@ -1,24 +0,0 @@ -# -# Hibernate, Relational Persistence for Idiomatic Java -# -# License: GNU Lesser General Public License (LGPL), version 2.1 or later. -# See the lgpl.txt file in the root directory or . -# -hibernate.dialect @db.dialect@ -hibernate.connection.driver_class @jdbc.driver@ -hibernate.connection.url @jdbc.url@ -hibernate.connection.username @jdbc.user@ -hibernate.connection.password @jdbc.pass@ -hibernate.connection.init_sql @connection.init_sql@ - -hibernate.connection.pool_size 1 -hibernate.jdbc.batch_size 10 -hibernate.connection.provider_class org.hibernate.connection.ProxoolConnectionProvider -hibernate.proxool.properties pool-one.properties - -hibernate.show_sql false - -hibernate.max_fetch_depth 5 - -hibernate.cache.region_prefix hibernate.test -hibernate.cache.region.factory_class org.hibernate.testing.cache.CachingRegionFactory diff --git a/hibernate-proxool/src/test/resources/log4j2.properties b/hibernate-proxool/src/test/resources/log4j2.properties deleted file mode 100644 index d4da0b21a5e8..000000000000 --- a/hibernate-proxool/src/test/resources/log4j2.properties +++ /dev/null @@ -1,19 +0,0 @@ -# -# Hibernate, Relational Persistence for Idiomatic Java -# -# License: GNU Lesser General Public License (LGPL), version 2.1 or later. -# See the lgpl.txt file in the root directory or . -# -appender.stdout.type=Console -appender.stdout.name=STDOUT -appender.stdout.layout.type=PatternLayout -appender.stdout.layout.pattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n - - -rootLogger.level=info -rootLogger.appenderRef.stdout.ref=STDOUT - -logger.hbm2ddl.name=org.hibernate.tool.hbm2ddl -logger.hbm2ddl.level=debug -logger.testing-cache.name=org.hibernate.testing.cache -logger.testing-cache.level=debug diff --git a/hibernate-proxool/src/test/resources/pool-one.properties b/hibernate-proxool/src/test/resources/pool-one.properties deleted file mode 100644 index e496ca4e61c4..000000000000 --- a/hibernate-proxool/src/test/resources/pool-one.properties +++ /dev/null @@ -1,13 +0,0 @@ -# -# Hibernate, Relational Persistence for Idiomatic Java -# -# License: GNU Lesser General Public License (LGPL), version 2.1 or later. -# See the lgpl.txt file in the root directory or . -# -jdbc-0.proxool.alias=pool-one -jdbc-0.proxool.driver-url=jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE -jdbc-0.proxool.driver-class=org.h2.Driver -jdbc-0.user=sa -jdbc-0.password= -jdbc-0.proxool.maximum-connection-count=2 -jdbc-0.proxool.house-keeping-test-sql=select CURRENT_DATE \ No newline at end of file diff --git a/hibernate-proxool/src/test/resources/pool-two.properties b/hibernate-proxool/src/test/resources/pool-two.properties deleted file mode 100644 index 12461079108d..000000000000 --- a/hibernate-proxool/src/test/resources/pool-two.properties +++ /dev/null @@ -1,13 +0,0 @@ -# -# Hibernate, Relational Persistence for Idiomatic Java -# -# License: GNU Lesser General Public License (LGPL), version 2.1 or later. -# See the lgpl.txt file in the root directory or . -# -jdbc-0.proxool.alias=pool-two -jdbc-0.proxool.driver-url=jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE -jdbc-0.proxool.driver-class=org.h2.Driver -jdbc-0.user=sa -jdbc-0.password= -jdbc-0.proxool.maximum-connection-count=2 -jdbc-0.proxool.house-keeping-test-sql=select CURRENT_DATE \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index 15d00111d928..366a4d161a7e 100644 --- a/settings.gradle +++ b/settings.gradle @@ -87,7 +87,6 @@ dependencyResolutionManagement { def agroalVersion = version "agroal", "2.5" def c3poVersion = version "c3p0", "0.10.1" def hikaricpVersion = version "hikaricp", "6.2.1" - def proxoolVersion = version "proxool", "0.8.3" def viburVersion = version "vibur", "25.0" def ucpVersion = version "ucp", "23.6.0.24.10" @@ -122,7 +121,6 @@ dependencyResolutionManagement { library( "agroalPool", "io.agroal", "agroal-pool" ).versionRef( agroalVersion ) library( "c3p0", "com.mchange", "c3p0" ).versionRef( c3poVersion ) library( "hikaricp", "com.zaxxer", "HikariCP" ).versionRef( hikaricpVersion ) - library( "proxool", "proxool", "proxool" ).versionRef( proxoolVersion ) library( "vibur", "org.vibur", "vibur-dbcp" ).versionRef( viburVersion ) library( "ucp", "com.oracle.database.jdbc", "ucp11" ).versionRef( ucpVersion ) @@ -327,7 +325,6 @@ include 'hibernate-community-dialects' include 'hibernate-vector' include 'hibernate-c3p0' -include 'hibernate-proxool' include 'hibernate-hikaricp' include 'hibernate-vibur' include 'hibernate-agroal' From 227cd1c02877f086ab9785587f31fa2c8de32eaf Mon Sep 17 00:00:00 2001 From: Gavin King Date: Sat, 30 Nov 2024 17:30:29 +0100 Subject: [PATCH 2/2] HHH-18902 completely remove Vibur it has not been updated in 5 years --- documentation/documentation.gradle | 6 - .../asciidoc/quickstart/guides/obtaining.adoc | 1 - .../chapters/jdbc/Database_Access.adoc | 27 +-- .../internal/ConnectionProviderInitiator.java | 8 - hibernate-platform/hibernate-platform.gradle | 2 - hibernate-vibur/hibernate-vibur.gradle | 20 -- .../StrategyRegistrationProviderImpl.java | 38 ---- .../internal/ViburDBCPConnectionProvider.java | 191 ------------------ .../vibur/internal/package-info.java | 11 - ...stry.selector.StrategyRegistrationProvider | 13 -- .../OSGI-INF/blueprint/blueprint.xml | 16 -- .../ViburDBCPConnectionProviderTest.java | 174 ---------------- .../src/test/resources/hibernate.properties | 15 -- .../src/test/resources/log4j2.properties | 83 -------- settings.gradle | 3 - 15 files changed, 3 insertions(+), 605 deletions(-) delete mode 100644 hibernate-vibur/hibernate-vibur.gradle delete mode 100644 hibernate-vibur/src/main/java/org/hibernate/vibur/internal/StrategyRegistrationProviderImpl.java delete mode 100644 hibernate-vibur/src/main/java/org/hibernate/vibur/internal/ViburDBCPConnectionProvider.java delete mode 100644 hibernate-vibur/src/main/java/org/hibernate/vibur/internal/package-info.java delete mode 100644 hibernate-vibur/src/main/resources/META-INF/services/org.hibernate.boot.registry.selector.StrategyRegistrationProvider delete mode 100644 hibernate-vibur/src/main/resources/OSGI-INF/blueprint/blueprint.xml delete mode 100644 hibernate-vibur/src/test/java/org/hibernate/test/vibur/ViburDBCPConnectionProviderTest.java delete mode 100644 hibernate-vibur/src/test/resources/hibernate.properties delete mode 100644 hibernate-vibur/src/test/resources/log4j2.properties diff --git a/documentation/documentation.gradle b/documentation/documentation.gradle index 32d2d6db9068..5538e82da402 100644 --- a/documentation/documentation.gradle +++ b/documentation/documentation.gradle @@ -52,7 +52,6 @@ configurations { agroal c3p0 hikaricp - vibur jcache @@ -71,7 +70,6 @@ configurations { extendsFrom agroal extendsFrom c3p0 extendsFrom hikaricp - extendsFrom vibur extendsFrom jcache extendsFrom jpamodelgen } @@ -132,7 +130,6 @@ dependencies { reportAggregation project(':hibernate-jcache') reportAggregation project(':hibernate-micrometer') reportAggregation project(':hibernate-spatial') - reportAggregation project(':hibernate-vibur') reportAggregation project(':hibernate-ant') reportAggregation project(':hibernate-maven-plugin') reportAggregation project(':hibernate-processor') @@ -160,9 +157,6 @@ dependencies { hikaricp project( ':hibernate-hikaricp' ) javadocSources project( path: ':hibernate-hikaricp', configuration: 'javadocSources' ) - vibur project( ':hibernate-vibur' ) - javadocSources project( path: ':hibernate-vibur', configuration: 'javadocSources' ) - jcache project( ':hibernate-jcache' ) javadocSources project( path: ':hibernate-jcache', configuration: 'javadocSources' ) diff --git a/documentation/src/main/asciidoc/quickstart/guides/obtaining.adoc b/documentation/src/main/asciidoc/quickstart/guides/obtaining.adoc index 2d376b82b9c1..495610c54ab4 100644 --- a/documentation/src/main/asciidoc/quickstart/guides/obtaining.adoc +++ b/documentation/src/main/asciidoc/quickstart/guides/obtaining.adoc @@ -52,7 +52,6 @@ transitive dependencies based on the features being used or not. |hibernate-agroal| Support for https://agroal.github.io/[Agroal] connection pooling |hibernate-c3p0| Support for https://www.mchange.com/projects/c3p0/[C3P0] connection pooling |hibernate-hikaricp| Support for https://github.com/brettwooldridge/HikariCP/[HikariCP] connection pooling -|hibernate-vibur| Support for https://www.vibur.org/[Vibur DBCP] connection pooling |hibernate-ucp| Support for https://docs.oracle.com/en/database/oracle/oracle-database/23/jjucp/intro.html[Universal Connection Pool] connection pooling |hibernate-jcache| Integration with https://jcp.org/en/jsr/detail?id=107$$[JCache], allowing any compliant implementation as a second-level cache provider |hibernate-graalvm| Experimental extension to make it easier to compile applications as a https://www.graalvm.org/[GraalVM] native image diff --git a/documentation/src/main/asciidoc/userguide/chapters/jdbc/Database_Access.adoc b/documentation/src/main/asciidoc/userguide/chapters/jdbc/Database_Access.adoc index 1057f663919b..b4498fed7fde 100644 --- a/documentation/src/main/asciidoc/userguide/chapters/jdbc/Database_Access.adoc +++ b/documentation/src/main/asciidoc/userguide/chapters/jdbc/Database_Access.adoc @@ -17,10 +17,9 @@ Hibernate will internally determine which `ConnectionProvider` to use based on t 2. else if `hibernate.connection.datasource` is set -> <> 3. else if any setting prefixed by `hibernate.c3p0.` is set -> <> 4. else if any setting prefixed by `hibernate.hikari.` is set -> <> -5. else if any setting prefixed by `hibernate.vibur.` is set -> <> -6. else if any setting prefixed by `hibernate.agroal.` is set -> <> -7. else if any setting prefixed by `hibernate.oracleucp.` is set -> <> -8. else if `hibernate.connection.url` is set -> <> +5. else if any setting prefixed by `hibernate.agroal.` is set -> <> +6. else if any setting prefixed by `hibernate.oracleucp.` is set -> <> +7. else if `hibernate.connection.url` is set -> <> 9. else -> <> [[database-connectionprovider-datasource]] @@ -92,26 +91,6 @@ Additionally, this `ConnectionProvider` will pick up the following Hibernate-spe Note that Hikari only supports JDBC standard isolation levels (apparently). `hibernate.connection.autocommit`:: Mapped to Hikari's `autoCommit` setting -[[database-connectionprovider-vibur]] -=== Using Vibur DBCP - -[IMPORTANT] -==== -To use the Vibur DBCP integration, the application must include the `hibernate-vibur` module jar (as well as its dependencies) on the classpath. -==== - -Hibernate also provides support for applications to use https://www.vibur.org/[Vibur DBCP] connection pool. - -Set all of your Vibur settings in Hibernate prefixed by `hibernate.vibur.` and this `ConnectionProvider` will pick them up and pass them along to Vibur DBCP. -Additionally, this `ConnectionProvider` will pick up the following Hibernate-specific properties and map them to the corresponding Vibur ones (any `hibernate.vibur.` prefixed ones have precedence): - -`hibernate.connection.driver_class`:: Mapped to Vibur's `driverClassName` setting -`hibernate.connection.url`:: Mapped to Vibur's `jdbcUrl` setting -`hibernate.connection.username`:: Mapped to Vibur's `username` setting -`hibernate.connection.password`:: Mapped to Vibur's `password` setting -`hibernate.connection.isolation`:: Mapped to Vibur's `defaultTransactionIsolationValue` setting. See <>. -`hibernate.connection.autocommit`:: Mapped to Vibur's `defaultAutoCommit` setting - [[database-connectionprovider-agroal]] === Using Agroal diff --git a/hibernate-core/src/main/java/org/hibernate/engine/jdbc/connections/internal/ConnectionProviderInitiator.java b/hibernate-core/src/main/java/org/hibernate/engine/jdbc/connections/internal/ConnectionProviderInitiator.java index d76e089deb49..00f8d5ee7be9 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/jdbc/connections/internal/ConnectionProviderInitiator.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/jdbc/connections/internal/ConnectionProviderInitiator.java @@ -70,11 +70,6 @@ public class ConnectionProviderInitiator implements StandardServiceInitiator. - */ - -description = 'Integration for Vibur Connection pooling as a Hibernate ORM ConnectionProvider' - -apply from: rootProject.file( 'gradle/relocated-published-java-module.gradle' ) - -dependencies { - implementation project( ':hibernate-core' ) - implementation libs.vibur - - testImplementation project( ':hibernate-testing' ) - testImplementation "org.vibur:vibur-dbcp:${libs.versions.vibur.get()}:tests" - testImplementation 'com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.4.2' -} - diff --git a/hibernate-vibur/src/main/java/org/hibernate/vibur/internal/StrategyRegistrationProviderImpl.java b/hibernate-vibur/src/main/java/org/hibernate/vibur/internal/StrategyRegistrationProviderImpl.java deleted file mode 100644 index fa81b948c44b..000000000000 --- a/hibernate-vibur/src/main/java/org/hibernate/vibur/internal/StrategyRegistrationProviderImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * SPDX-License-Identifier: LGPL-2.1-or-later - * Copyright Red Hat Inc. and Hibernate Authors - */ -package org.hibernate.vibur.internal; - -import java.util.Collections; - -import org.hibernate.boot.registry.selector.SimpleStrategyRegistrationImpl; -import org.hibernate.boot.registry.selector.StrategyRegistration; -import org.hibernate.boot.registry.selector.StrategyRegistrationProvider; -import org.hibernate.engine.jdbc.connections.spi.ConnectionProvider; - -/** - * Provides the {@link ViburDBCPConnectionProvider} to the - * {@link org.hibernate.boot.registry.selector.spi.StrategySelector} service. - * - * @author Simeon Malchev - */ -public final class StrategyRegistrationProviderImpl implements StrategyRegistrationProvider { - - @Override - @SuppressWarnings("unchecked") - public Iterable getStrategyRegistrations() { - return Collections.singletonList( - new SimpleStrategyRegistrationImpl<>( - ConnectionProvider.class, - ViburDBCPConnectionProvider.class, - "vibur", - "viburdbcp", - ViburDBCPConnectionProvider.class.getSimpleName(), - // for backward compatibility with pre-existing Vibur project Hibernate integration artifacts - "org.vibur.dbcp.integration.ViburDBCPConnectionProvider", - // for consistency's sake - "org.hibernate.connection.ViburDBCPConnectionProvider" - ) ); - } -} diff --git a/hibernate-vibur/src/main/java/org/hibernate/vibur/internal/ViburDBCPConnectionProvider.java b/hibernate-vibur/src/main/java/org/hibernate/vibur/internal/ViburDBCPConnectionProvider.java deleted file mode 100644 index dfc2e545b7b7..000000000000 --- a/hibernate-vibur/src/main/java/org/hibernate/vibur/internal/ViburDBCPConnectionProvider.java +++ /dev/null @@ -1,191 +0,0 @@ -/* - * SPDX-License-Identifier: LGPL-2.1-or-later - * Copyright Red Hat Inc. and Hibernate Authors - */ -package org.hibernate.vibur.internal; - -import java.sql.Connection; -import java.sql.DatabaseMetaData; -import java.sql.SQLException; -import java.util.Map; -import java.util.Properties; - -import org.hibernate.dialect.Dialect; -import org.hibernate.engine.jdbc.connections.internal.DatabaseConnectionInfoImpl; -import org.hibernate.engine.jdbc.connections.spi.ConnectionProvider; -import org.hibernate.engine.jdbc.connections.spi.DatabaseConnectionInfo; -import org.hibernate.internal.log.ConnectionInfoLogger; -import org.hibernate.internal.util.StringHelper; -import org.hibernate.service.UnknownUnwrapTypeException; -import org.hibernate.service.spi.Configurable; -import org.hibernate.service.spi.Stoppable; - -import org.vibur.dbcp.ViburDBCPDataSource; - -import static org.hibernate.cfg.AvailableSettings.AUTOCOMMIT; -import static org.hibernate.cfg.AvailableSettings.DRIVER; -import static org.hibernate.cfg.AvailableSettings.ISOLATION; -import static org.hibernate.cfg.AvailableSettings.PASS; -import static org.hibernate.cfg.AvailableSettings.URL; -import static org.hibernate.cfg.AvailableSettings.USER; -import static org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.allowJdbcMetadataAccess; - -/** - *

ViburDBCP connection provider for Hibernate integration. - *

- * To use this connection provider set: - *

- *   hibernate.connection.provider_class ViburDBCPConnectionProvider
- * 
- *

- * Supported Hibernate properties are: - *

- *   hibernate.connection.driver_class
- *   hibernate.connection.url
- *   hibernate.connection.username
- *   hibernate.connection.password
- *   hibernate.connection.isolation
- *   hibernate.connection.autocommit
- * 
- *

- * All {@link org.vibur.dbcp.ViburConfig} properties are also supported via using the - * {@code hibernate.vibur} prefix. - * - * @author Simeon Malchev - * @see ConnectionProvider - */ -public class ViburDBCPConnectionProvider implements ConnectionProvider, Configurable, Stoppable { - - private static final String VIBUR_CONFIG_PREFIX = "hibernate.vibur"; - private static final String VIBUR_PREFIX = VIBUR_CONFIG_PREFIX + "."; - - private ViburDBCPDataSource dataSource = null; - private boolean isMetadataAccessAllowed = true; - - @Override - public void configure(Map configurationValues) { - isMetadataAccessAllowed = allowJdbcMetadataAccess( configurationValues ); - - ConnectionInfoLogger.INSTANCE.configureConnectionPool( "Vibur" ); - - dataSource = new ViburDBCPDataSource( transform( configurationValues ) ); - dataSource.start(); - } - - @Override - public Connection getConnection() throws SQLException { - return dataSource.getConnection(); - } - - @Override - public void closeConnection(Connection connection) throws SQLException { - connection.close(); - } - - @Override - public void stop() { - if ( dataSource != null ) { - ConnectionInfoLogger.INSTANCE.cleaningUpConnectionPool( VIBUR_CONFIG_PREFIX ); - dataSource.terminate(); - dataSource = null; - } - } - - @Override - public boolean supportsAggressiveRelease() { - return false; - } - - @Override - public DatabaseConnectionInfo getDatabaseConnectionInfo(Dialect dialect) { - return new DatabaseConnectionInfoImpl( - dataSource.getJdbcUrl(), - // Attempt to resolve the driver name from the dialect, in case it wasn't explicitly set and access to - // the database metadata is allowed - !StringHelper.isBlank( dataSource.getDriverClassName() ) ? dataSource.getDriverClassName() : extractDriverNameFromMetadata(), - dialect.getVersion(), - String.valueOf( dataSource.getDefaultAutoCommit() ), - dataSource.getDefaultTransactionIsolation(), - dataSource.getPoolInitialSize(), - dataSource.getPoolMaxSize() - ); - } - - private String extractDriverNameFromMetadata() { - if (isMetadataAccessAllowed) { - try ( Connection conn = getConnection() ) { - DatabaseMetaData dbmd = conn.getMetaData(); - return dbmd.getDriverName(); - } - catch (SQLException e) { - // Do nothing - } - } - return null; - } - - @Override - public boolean isUnwrappableAs(Class unwrapType) { - return ConnectionProvider.class.equals( unwrapType ) - || ViburDBCPConnectionProvider.class.isAssignableFrom( unwrapType ); - } - - @Override - @SuppressWarnings("unchecked") - public T unwrap(Class unwrapType) { - if ( isUnwrappableAs( unwrapType ) ) { - return (T) this; - } - else { - throw new UnknownUnwrapTypeException( unwrapType ); - } - } - - private static Properties transform(Map configurationValues) { - Properties result = new Properties(); - - String driverClassName = (String) configurationValues.get( DRIVER ); - if ( driverClassName != null ) { - result.setProperty( "driverClassName", driverClassName ); - } - - String jdbcUrl = (String) configurationValues.get( URL ); - if ( jdbcUrl != null ) { - result.setProperty( "jdbcUrl", jdbcUrl ); - } - - String username = (String) configurationValues.get( USER ); - if ( username != null ) { - result.setProperty( "username", username ); - } - String password = (String) configurationValues.get( PASS ); - if ( password != null ) { - result.setProperty( "password", password ); - } - - String defaultTransactionIsolationValue = (String) configurationValues.get( ISOLATION ); - if ( defaultTransactionIsolationValue != null ) { - result.setProperty( "defaultTransactionIsolationValue", defaultTransactionIsolationValue ); - } - String defaultAutoCommit = (String) configurationValues.get( AUTOCOMMIT ); - if ( defaultAutoCommit != null ) { - result.setProperty( "defaultAutoCommit", defaultAutoCommit ); - } - - for ( Map.Entry entry : configurationValues.entrySet() ) { - String key = entry.getKey(); - if ( key.startsWith( VIBUR_PREFIX ) ) { - key = key.substring( VIBUR_PREFIX.length() ); - result.setProperty( key, (String) entry.getValue() ); - } - } - return result; - } - - /** - * Visible for testing purposes. - */ - public ViburDBCPDataSource getDataSource() { - return dataSource; - } -} diff --git a/hibernate-vibur/src/main/java/org/hibernate/vibur/internal/package-info.java b/hibernate-vibur/src/main/java/org/hibernate/vibur/internal/package-info.java deleted file mode 100644 index c81ae20146ff..000000000000 --- a/hibernate-vibur/src/main/java/org/hibernate/vibur/internal/package-info.java +++ /dev/null @@ -1,11 +0,0 @@ -/* - * Hibernate, Relational Persistence for Idiomatic Java - * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . - */ - -/** - * Implementation of ConnectionProvider using ViburDBCP. - */ -package org.hibernate.vibur.internal; diff --git a/hibernate-vibur/src/main/resources/META-INF/services/org.hibernate.boot.registry.selector.StrategyRegistrationProvider b/hibernate-vibur/src/main/resources/META-INF/services/org.hibernate.boot.registry.selector.StrategyRegistrationProvider deleted file mode 100644 index e6d7caf1a175..000000000000 --- a/hibernate-vibur/src/main/resources/META-INF/services/org.hibernate.boot.registry.selector.StrategyRegistrationProvider +++ /dev/null @@ -1,13 +0,0 @@ -# -# Hibernate, Relational Persistence for Idiomatic Java -# -# License: GNU Lesser General Public License (LGPL), version 2.1 or later. -# See the lgpl.txt file in the root directory or . -# -# -# Hibernate, Relational Persistence for Idiomatic Java -# -# License: GNU Lesser General Public License (LGPL), version 2.1 or later. -# See the lgpl.txt file in the root directory or . -# -org.hibernate.vibur.internal.StrategyRegistrationProviderImpl diff --git a/hibernate-vibur/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/hibernate-vibur/src/main/resources/OSGI-INF/blueprint/blueprint.xml deleted file mode 100644 index 09148fa4fb4b..000000000000 --- a/hibernate-vibur/src/main/resources/OSGI-INF/blueprint/blueprint.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - diff --git a/hibernate-vibur/src/test/java/org/hibernate/test/vibur/ViburDBCPConnectionProviderTest.java b/hibernate-vibur/src/test/java/org/hibernate/test/vibur/ViburDBCPConnectionProviderTest.java deleted file mode 100644 index 168ad62970c1..000000000000 --- a/hibernate-vibur/src/test/java/org/hibernate/test/vibur/ViburDBCPConnectionProviderTest.java +++ /dev/null @@ -1,174 +0,0 @@ -/* - * SPDX-License-Identifier: LGPL-2.1-or-later - * Copyright Red Hat Inc. and Hibernate Authors - */ -package org.hibernate.test.vibur; - -import org.hibernate.Session; -import org.hibernate.cfg.Configuration; -import org.hibernate.engine.jdbc.connections.spi.ConnectionProvider; -import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase; -import org.hibernate.vibur.internal.ViburDBCPConnectionProvider; -import org.junit.After; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.ArgumentCaptor; -import org.mockito.Captor; -import org.mockito.InOrder; -import org.mockito.junit.MockitoJUnitRunner; -import org.vibur.dbcp.ViburDBCPDataSource; -import org.vibur.dbcp.stcache.StatementHolder; -import org.vibur.dbcp.stcache.StatementMethod; - -import jakarta.persistence.Entity; -import jakarta.persistence.Id; -import java.util.*; -import java.util.concurrent.ConcurrentMap; - -import static org.hibernate.cfg.AvailableSettings.*; -import static org.hibernate.testing.transaction.TransactionUtil.doInHibernate; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import static org.mockito.ArgumentMatchers.same; -import static org.mockito.Mockito.inOrder; -import static org.vibur.dbcp.AbstractDataSourceTest.mockStatementCache; -import static org.vibur.dbcp.stcache.StatementHolder.State.AVAILABLE; - -/** - * Hibernate unit/integration test for {@link ViburDBCPConnectionProvider}. - * - * @author Simeon Malchev - */ -@RunWith(MockitoJUnitRunner.class) -public class ViburDBCPConnectionProviderTest extends BaseCoreFunctionalTestCase { - - private int poolMaxSize; - private int statementCacheMaxSize; - - @Override - protected void configure(Configuration configuration) { - Properties properties = configuration.getProperties(); - properties.put(CONNECTION_PROVIDER, ViburDBCPConnectionProvider.class); - properties.put(SHOW_SQL, Boolean.TRUE); - properties.put(FORMAT_SQL, Boolean.TRUE); - - properties.put("hibernate.vibur.poolInitialSize", "1"); - properties.put("hibernate.vibur.poolMaxSize", Integer.toString(poolMaxSize)); - properties.put("hibernate.vibur.logQueryExecutionLongerThanMs", "100"); - properties.put("hibernate.vibur.statementCacheMaxSize", Integer.toString(statementCacheMaxSize)); - } - - @Override - protected Class[] getAnnotatedClasses() { - return new Class[] { Actor.class }; - } - - public void setUpPoolAndDatabase(int poolMaxSize, int statementCacheMaxSize) { - this.poolMaxSize = poolMaxSize; - this.statementCacheMaxSize = statementCacheMaxSize; - buildSessionFactory(); - - doInHibernate(this::sessionFactory, session -> { - addDbRecord(session, 1L, "CHRISTIAN", "GABLE"); - addDbRecord(session, 2L, "CHRISTIAN", "AKROYD"); - addDbRecord(session, 3L, "CHRISTIAN", "NEESON"); - addDbRecord(session, 4L, "CAMERON", "NEESON"); - addDbRecord(session, 5L, "RAY", "JOHANSSON"); - }); - } - - private static void addDbRecord(Session session, Long id, String firstName, String lastName) { - Actor actor = new Actor(); - actor.setId( id ); - actor.setFirstName(firstName); - actor.setLastName(lastName); - session.persist(actor); - } - - @After - public void tearDown() { - releaseSessionFactory(); - } - - @Captor - private ArgumentCaptor key1, key2; - @Captor - private ArgumentCaptor val1; - - @Test - public void testSelectStatementNoStatementsCache() { - setUpPoolAndDatabase(2, 0 /* disables the statements cache */ ); - - doInHibernate(this::sessionFactory, ViburDBCPConnectionProviderTest::executeAndVerifySelect); - } - - @Test - public void testSelectStatementWithStatementsCache() { - setUpPoolAndDatabase(1, 10 /* statement cache is enabled */ ); - - ConnectionProvider cp = sessionFactory().getServiceRegistry().getService(ConnectionProvider.class); - ViburDBCPDataSource ds = ((ViburDBCPConnectionProvider) cp).getDataSource(); - - ConcurrentMap mockedStatementCache = mockStatementCache(ds); - - doInHibernate(this::sessionFactory, ViburDBCPConnectionProviderTest::executeAndVerifySelect); - - // We set above the poolMaxSize = 1, that's why the second session will get and use the same underlying connection. - doInHibernate(this::sessionFactory, ViburDBCPConnectionProviderTest::executeAndVerifySelect); - - InOrder inOrder = inOrder(mockedStatementCache); - inOrder.verify(mockedStatementCache).get(key1.capture()); - inOrder.verify(mockedStatementCache).putIfAbsent(same(key1.getValue()), val1.capture()); - inOrder.verify(mockedStatementCache).get(key2.capture()); - - assertEquals(1, mockedStatementCache.size()); - assertTrue(mockedStatementCache.containsKey(key1.getValue())); - assertEquals(key1.getValue(), key2.getValue()); - assertEquals(AVAILABLE, val1.getValue().state().get()); - } - - @SuppressWarnings("unchecked") - private static void executeAndVerifySelect(Session session) { - List list = session.createQuery("from Actor where firstName = ?1") - .setParameter(1, "CHRISTIAN").list(); - - Set expectedLastNames = new HashSet<>(Arrays.asList("GABLE", "AKROYD", "NEESON")); - assertEquals(expectedLastNames.size(), list.size()); - for (Actor actor : list) { - assertTrue(expectedLastNames.remove(actor.getLastName())); - } - } - - @Entity(name="Actor") - public static class Actor { - @Id - private Long id; - - private String firstName; - private String lastName; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getFirstName() { - return firstName; - } - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - public String getLastName() { - return lastName; - } - - public void setLastName(String lastName) { - this.lastName = lastName; - } - } -} diff --git a/hibernate-vibur/src/test/resources/hibernate.properties b/hibernate-vibur/src/test/resources/hibernate.properties deleted file mode 100644 index 8953491b9c19..000000000000 --- a/hibernate-vibur/src/test/resources/hibernate.properties +++ /dev/null @@ -1,15 +0,0 @@ -# -# Hibernate, Relational Persistence for Idiomatic Java -# -# License: GNU Lesser General Public License (LGPL), version 2.1 or later. -# See the lgpl.txt file in the root directory or . -# -hibernate.dialect @db.dialect@ -hibernate.connection.driver_class @jdbc.driver@ -hibernate.connection.url @jdbc.url@ -hibernate.connection.username @jdbc.user@ -hibernate.connection.password @jdbc.pass@ -hibernate.connection.init_sql @connection.init_sql@ - -hibernate.jdbc.batch_size 10 -hibernate.connection.provider_class ViburDBCPConnectionProvider diff --git a/hibernate-vibur/src/test/resources/log4j2.properties b/hibernate-vibur/src/test/resources/log4j2.properties deleted file mode 100644 index d7690ac35a4f..000000000000 --- a/hibernate-vibur/src/test/resources/log4j2.properties +++ /dev/null @@ -1,83 +0,0 @@ -# -# Hibernate, Relational Persistence for Idiomatic Java -# -# License: GNU Lesser General Public License (LGPL), version 2.1 or later. -# See the lgpl.txt file in the root directory or . -# -appender.stdout.type=Console -appender.stdout.name=STDOUT -appender.stdout.layout.type=PatternLayout -appender.stdout.layout.pattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n -appender.stdout.layout.pattern=%d{ABSOLUTE} %5p %c{1}:%L (hibernateLoadPlanWalkPath->%X{hibernateLoadPlanWalkPath}) - %m%n - -appender.stdout-mdc.type=Console -appender.stdout-mdc.name=stdout-mdc -appender.stdout-mdc.layout.type=PatternLayout -appender.stdout-mdc.layout.pattern=%d{ABSOLUTE} %5p %c{1}:%L (walk path -> %X{hibernateLoadPlanWalkPath}) - %m%n - -appender.unclosedSessionFactoryFile.type=File -appender.unclosedSessionFactoryFile.name=unclosedSessionFactoryFile -appender.unclosedSessionFactoryFile.append=true -appender.unclosedSessionFactoryFile.fileName=target/tmp/log/UnclosedSessionFactoryWarnings.log -appender.unclosedSessionFactoryFile.layout.type=PatternLayout -appender.unclosedSessionFactoryFile.layout.pattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n - -rootLogger.level=info -rootLogger.appenderRef.stdout.ref=STDOUT - -logger.loader-plan.name=org.hibernate.loader.plan -#logger.loader-plan.level=trace -#logger.loader-plan.appenderRef.stdout-mdc.ref=stdout-mdc -#logger.loader-plan.additivity=false -logger.persister-walking.name=org.hibernate.persister.walking -#logger.persister-walking.level=trace -#logger.persister-walking.appenderRef.stdout-mdc.ref=stdout-mdc -#logger.persister-walking.additivity=false - -logger.hbm2ddl.name=org.hibernate.tool.hbm2ddl -logger.hbm2ddl.level=trace -logger.testing-cache.name=org.hibernate.testing.cache -logger.testing-cache.level=debug - -# SQL Logging - HHH-6833 -logger.sql.name=org.hibernate.SQL -logger.sql.level=debug - -logger.type-basic-binder.name=org.hibernate.type.descriptor.jdbc.BasicBinder -logger.type-basic-binder.level=trace -logger.type-basic-extractor.name=org.hibernate.type.descriptor.jdbc.BasicExtractor -logger.type-basic-extractor.level=trace - -logger.hql-internal-ast.name=org.hibernate.hql.internal.ast -logger.hql-internal-ast.level=debug - -logger.sql-ordering-antlr.name=org.hibernate.sql.ordering.antlr -logger.sql-ordering-antlr.level=debug - -logger.load-plan-impl.name=org.hibernate.loader.plan2.build.internal.LoadPlanImpl -logger.load-plan-impl.level=debug -logger.load-plan-tree-printer.name=org.hibernate.loader.plan2.build.spi.LoadPlanTreePrinter -logger.load-plan-tree-printer.level=debug -logger.entity-load-query-details.name=org.hibernate.loader.plan2.exec.spi.EntityLoadQueryDetails -logger.entity-load-query-details.level=debug - -logger.statistical-logging-session-event-listener.name=org.hibernate.engine.internal.StatisticalLoggingSessionEventListener -logger.statistical-logging-session-event-listener.level=info - -logger.model-binder.name=org.hibernate.boot.model.source.internal.hbm.ModelBinder -logger.model-binder.level=debug -logger.java-type-descriptor-registry.name=org.hibernate.type.descriptor.java.JavaTypeRegistry -logger.java-type-descriptor-registry.level=debug - - -logger.merged-entity-copies.name=org.hibernate.event.internal.EntityCopyAllowedLoggedObserver -### When entity copy merge functionality is enabled using: -### hibernate.event.merge.entity_copy_observer=log, the following will -### provide information about merged entity copies. -#logger.merged-entity-copies.level=debug - -logger.test-class-metadata.name=org.hibernate.testing.junit4.TestClassMetadata -logger.test-class-metadata.level=info -logger.test-class-metadata.appenderRef.unclosedSessionFactoryFile.ref=unclosedSessionFactoryFile -logger.scanning-coordinator.name=org.hibernate.boot.model.process.internal.ScanningCoordinator -logger.scanning-coordinator.level=debug diff --git a/settings.gradle b/settings.gradle index 366a4d161a7e..da0fca8cba5f 100644 --- a/settings.gradle +++ b/settings.gradle @@ -87,7 +87,6 @@ dependencyResolutionManagement { def agroalVersion = version "agroal", "2.5" def c3poVersion = version "c3p0", "0.10.1" def hikaricpVersion = version "hikaricp", "6.2.1" - def viburVersion = version "vibur", "25.0" def ucpVersion = version "ucp", "23.6.0.24.10" def jcacheVersion = version "jcache", "1.0.0" @@ -121,7 +120,6 @@ dependencyResolutionManagement { library( "agroalPool", "io.agroal", "agroal-pool" ).versionRef( agroalVersion ) library( "c3p0", "com.mchange", "c3p0" ).versionRef( c3poVersion ) library( "hikaricp", "com.zaxxer", "HikariCP" ).versionRef( hikaricpVersion ) - library( "vibur", "org.vibur", "vibur-dbcp" ).versionRef( viburVersion ) library( "ucp", "com.oracle.database.jdbc", "ucp11" ).versionRef( ucpVersion ) library( "ojdbc11", "com.oracle.database.jdbc", "ojdbc11" ).versionRef( ucpVersion ) @@ -326,7 +324,6 @@ include 'hibernate-vector' include 'hibernate-c3p0' include 'hibernate-hikaricp' -include 'hibernate-vibur' include 'hibernate-agroal' include 'hibernate-ucp'