File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Regarding setLoginTimeout(int seconds) in JDBC
Joined: Jan 30, 2009
Feb 19, 2009 07:55:24
The docs say that
public static void setLoginTimeout(int seconds)
Sets the maximum time in seconds that a driver will wait while attempting to connect to a database.
Now if i set a Connection TimeOut for 5 secs , and how can i throw an exception on this if it exceeds 5 secs ??
If you want something you never had do something which you had never done
Joined: Oct 23, 2005
Feb 23, 2009 22:07:19
It will throw the exception for you. You can catch it by putting a try/catch around the connection code.
Down Home Country Coding with Scott Selikoff
I agree. Here's the link:
subject: Regarding setLoginTimeout(int seconds) in JDBC
JVM memory releasing after memory consuming task
inconvertible types found : int required: java.lang.Short
Adding 2 Times Together
Need help with a graceful failed database connection recovery
read timeout not working after given period
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013