title: Timeout Database connection in Java
body: <p>What options are available in Java to timeout a database connection at a specific period of time?</p>
  
  <p>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.</p>
  
  <p>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?</p>
  
  <p>Thank you</p>