Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Introducing JavaFX 8 Programming
this week in the
JDBC and Relational Databases
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.
[OCA 8 Book]
I agree. Here's the link:
subject: Regarding setLoginTimeout(int seconds) in JDBC
read timeout not working after given period
JVM memory releasing after memory consuming task
Adding 2 Times Together
inconvertible types found : int required: java.lang.Short
Need help with a graceful failed database connection recovery
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015