You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I currently have some logic that occurs when retrieving a database connection from a wrapper class on HikariDataSource, and I'd like to rollback those changes by hooking the indirect calls to .close() we make on the connection using try-with-resources.
Is there an easy way to provide a callback which can do this, without building a new connection wrapper around the Hikari connection? I can't see any documentation to this end but I may have missed it.
Happy to provide a code snippet if I'm not making sense.
The text was updated successfully, but these errors were encountered:
To expand further, I've looked into doing this by using a wrapper and it seems that the close method on the abstract ProxyConnection is final, so I can't override it without using unsafe methods, as far as I can see. Open to ideas!
I currently have some logic that occurs when retrieving a database connection from a wrapper class on HikariDataSource, and I'd like to rollback those changes by hooking the indirect calls to .close() we make on the connection using try-with-resources.
Is there an easy way to provide a callback which can do this, without building a new connection wrapper around the Hikari connection? I can't see any documentation to this end but I may have missed it.
Happy to provide a code snippet if I'm not making sense.
The text was updated successfully, but these errors were encountered: