File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes JDBC QueryTimeout and Databases Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC QueryTimeout and Databases" Watch "JDBC QueryTimeout and Databases" New topic
Author

JDBC QueryTimeout and Databases

Rahul Bose
Greenhorn

Joined: May 04, 2007
Posts: 2
Hi,

java.sql.Statement.QueryTimeout() times out the jdbc call if the db query takes more than the specified time. But can anybody tell me whether the query is terminated at the Database level or not ? Is it possible that the call timesout but the query continues to run on the DB ?

Thanks in advance,
-r
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29241
    
139

Rahul,
Welcome to JavaRanch!

The query does continue on the database. I don't know of any databases that have an automatic query kill.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Rahul Bose
Greenhorn

Joined: May 04, 2007
Posts: 2
Thank You. Yes it *does not* timeout at least in db2.
 
 
subject: JDBC QueryTimeout and Databases
 
Similar Threads
Regarding transaction updates
sql query --on the fly
Select query row count (without explicit select query)
how get connection Id of JDBC connection object
java.lang.ClassNotFoundException