We noticed that:
* Invoking {{ java.sql.Connection#clearWarnings }} is not very efficient on several JDBC drivers * Hibernate ORM clears such warnings before closing each connection and returning it to the connection pool * Some connection pool implementations such as Agroal (and likely most others too?) will also clear such warnings when the connection is returned to the pool.
It seems sensible to allow this _clearWarnings_ operation to happen once at most; since this capability depends on the Connection Pool I will introduce a new flag on the pool: at this stage I don't expect to make this a configurable user property, but allow the implementors of {{ ConnectionProvider }} to hint about this capability : similarly to \{\{org . hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.ConnectionProviderJdbcConnectionAccess#supportsAggressiveRelease }} |
|