Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added 'closeLeakedConnections' property which enables leaked connections closing. #114

Closed
wants to merge 2 commits into from

Conversation

rgorodischer
Copy link

closeLeakedConnections property controls whether unreturned connection must be closed automatically after being used longer than the time limit specified by leakDetectionThreshold property.

The true value for this property is only valid when a positive value for the connection leak
detection threshold is specified. False by default.

@brettwooldridge
Copy link
Owner

Thanks for the contribution, Roman. Unfortunately, this is not a property we are interested in adding to the pool. Of course as we surveyed other pools before building HikariCP we encountered pools that offer this as an option.

However, we disagree in principal that a pool should act to cover-up what are in effect defects in the application layer. If there were no pool present, such a defect would exhaust the available connections of the underlying database, and eventually fail. The pool should not mask or make such a defect transparent.

If this functionality is somehow critical to your application, you are free to maintain a fork of HikariCP of course, or consider a fairly reliable alternative such as the Tomcat JDBC pool.

@brettwooldridge
Copy link
Owner

BTW, the quality of the code in the request was quite good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants