What options are available in Java to timeout a database connection at a specific period of time?
For example, an application creates a database connection from a data source, then it executes a SQL query which might take 5,15 or even over 60 minutes to return results. This behavior is causing other issues.
What I am asking is regarding this scenario, how can we have the application make the database call and after 15 minutes if the query is still running, then stop query, close connection and continue with the application execution?
Thank you