|
|||||||||||
|
Re: [JDBC] Implementing setQueryTimeout()
From: Oliver Jowett <oliver(at)opencloud.com>
Date: Tue Feb 19 2008 - 03:46:38 EST
>> Oliver Jowett wrote: >>>> A network timeout or anything worse is handled in an entirely >>>> different part of the code. That is not the responsibility of the >>>> driver, and doesn't event need to be part of the database related >>>> code at all. >>> >>> I'm not sure what you mean here - if the connection to the DB fails, >>> the driver will certainly handle that and tell you about it via a >>> SQLException! >> >> Sorry. Of course the driver must handle failed connections. I meant >> the code in my application, which handles the two cases (timeout but >> usable connection vs broken connection for whatever reason) differently. > > You can check the SQLState of any exception thrown to tell the > difference, right? Just to clarify:
Basically the "hard query" timeout just introduces a new cause of connection errors - "server didn't respond within the timeout". It will otherwise behave like any other network-level connection error. -O
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match
Received on Tue Feb 19 03:49:00 2008This archive was generated by hypermail 2.1.8 : Wed Jun 18 2008 - 23:44:58 EDT |
||||||||||
|
|||||||||||