One of the SQL query takes time and we don't want any query to execute for more than 10 mins...However when the SQL takes too much time, we want to stop it from application and DB end...If i use Future.submit and executes a DB query...If we end up the hibernate session after future.cancel, will the DB thread will be killed. Or irrespective of killing the hibernate session or using future.cancel DB still executes the query in the DB side.
This arises the following questions
1. Will future.cancel kills the executing DB query in the DB
2. Will hibernate session end kills the executing DB query in the DB