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
Facing an issue with try-with-resources as it is not closing the database connections automatically particularly for one select query while working for other queries of the same class within a java application. Please suggest what could be the issue here. Steps to Reproduce
Execute the problematic select query using the try-with-resources statement.
Monitor the database connections to observe that the connection is not closed.
Execute other queries in the same class to confirm that their connections are closed properly. Expected Behavior
The database connection should be automatically closed after the try-with-resources block for all queries.
Actual Behavior
The database connection remains open for one specific select query, causing potential resource leaks.
The text was updated successfully, but these errors were encountered:
@baliyanshilpa04 HikariCP reuses connections. When you call the method close you will return the connection to the pool, but the physical connection to the database will still exist.
Look at com.zaxxer.hikari.pool.ProxyConnection for more details.
Facing an issue with try-with-resources as it is not closing the database connections automatically particularly for one select query while working for other queries of the same class within a java application. Please suggest what could be the issue here.
Steps to Reproduce
Execute the problematic select query using the try-with-resources statement.
Monitor the database connections to observe that the connection is not closed.
Execute other queries in the same class to confirm that their connections are closed properly.
Expected Behavior
The database connection should be automatically closed after the try-with-resources block for all queries.
Actual Behavior
The database connection remains open for one specific select query, causing potential resource leaks.
The text was updated successfully, but these errors were encountered: