| Author |
Trying to set query timeout for PreparedStatement object
|
Susan Smith
Ranch Hand
Joined: Oct 13, 2007
Posts: 223
|
|
Hi,
I'm trying to set query timeout for a PreparedStatement object (below is the code snippet).
I set the query timeout to "1" second just for testing first. But I notice the query takes longer than 1 second but it is successfully executed. No SQLException is thrown. I'm confused why this doesn't work. Can someone please advise?
Thanks in advance for all the help.
|
 |
Susan Smith
Ranch Hand
Joined: Oct 13, 2007
Posts: 223
|
|
Hi,
Sorry to bother you guys again.
Just want to follow up if anyone knows some pointers to my question.
Thanks again in advance for the help.
Let me know if I can provide more information.
|
 |
Rich Remington
Greenhorn
Joined: Sep 13, 2009
Posts: 1
|
|
I just read that the timing (when the timeout exception is thrown) is not very precise and may take a few seconds to actually materialize. Your query may have completed before then.
Here is a reference URL for your reading pleasure -> http://forums.oracle.com/forums/thread.jspa?threadID=550257
HTH
Susan Smith wrote:Hi,
Sorry to bother you guys again.
...
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19232
|
|
|
No idea why I haven't moved this thread before, but it clearly belongs in our JDBC forum. Finally moving it.
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
Balu Sadhasivam
Ranch Hand
Joined: Jan 01, 2009
Posts: 874
|
|
No idea why I haven't moved this thread before, but it clearly belongs in our JDBC forum. Finally moving it.
yeah certainly would have triggered better responses in JDBC.
|
 |
 |
|
|
subject: Trying to set query timeout for PreparedStatement object
|
|
|