[hibernate-issues] [JIRA] (HHH-13880) Allow to delegate the clearing of JDBC warnings on Connection close to the Connection Pool implementor

Sanne Grinovero (JIRA) jira at hibernate.atlassian.net
Wed Feb 26 08:20:52 EST 2020


Sanne Grinovero ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A99e61e65-956b-4a21-b29c-06057642e9ea ) *updated* an issue

Hibernate ORM ( https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiMDlmMDAyZGNlYjhiNDE5NWJiNThhMjA4ODc0MmI1MjciLCJwIjoiaiJ9 ) / Improvement ( https://hibernate.atlassian.net/browse/HHH-13880?atlOrigin=eyJpIjoiMDlmMDAyZGNlYjhiNDE5NWJiNThhMjA4ODc0MmI1MjciLCJwIjoiaiJ9 ) HHH-13880 ( https://hibernate.atlassian.net/browse/HHH-13880?atlOrigin=eyJpIjoiMDlmMDAyZGNlYjhiNDE5NWJiNThhMjA4ODc0MmI1MjciLCJwIjoiaiJ9 ) Allow to delegate the clearing of JDBC warnings on Connection close to the Connection Pool implementor ( https://hibernate.atlassian.net/browse/HHH-13880?atlOrigin=eyJpIjoiMDlmMDAyZGNlYjhiNDE5NWJiNThhMjA4ODc0MmI1MjciLCJwIjoiaiJ9 )

Change By: Sanne Grinovero ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A99e61e65-956b-4a21-b29c-06057642e9ea )

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 }} 

( https://hibernate.atlassian.net/browse/HHH-13880#add-comment?atlOrigin=eyJpIjoiMDlmMDAyZGNlYjhiNDE5NWJiNThhMjA4ODc0MmI1MjciLCJwIjoiaiJ9 ) Add Comment ( https://hibernate.atlassian.net/browse/HHH-13880#add-comment?atlOrigin=eyJpIjoiMDlmMDAyZGNlYjhiNDE5NWJiNThhMjA4ODc0MmI1MjciLCJwIjoiaiJ9 )

Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100121- sha1:cefda43 )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-issues/attachments/20200226/ae6da8a5/attachment.html 


More information about the hibernate-issues mailing list