jQuery in Action, 3rd edition
The moose likes JDBC and Relational Databases 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 and Relational Databases
Bookmark "JDBC QueryTimeout and Databases" Watch "JDBC QueryTimeout and Databases" New topic

JDBC QueryTimeout and Databases

Rahul Bose

Joined: May 04, 2007
Posts: 2

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,
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33102

Welcome to JavaRanch!

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

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Rahul Bose

Joined: May 04, 2007
Posts: 2
Thank You. Yes it *does not* timeout at least in db2.
I agree. Here's the link: http://aspose.com/file-tools
subject: JDBC QueryTimeout and Databases
jQuery in Action, 3rd edition