Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / January 2007

Tip: Looking for answers? Try searching our database.

Java - Does DB2Driver support connection timeout?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
dweilerthi@gmail.com - 02 Jan 2007 18:22 GMT
We are using UDB 8 with net drivers, and trying to set the connection
timeout, by calling DriverManager.setLoginTimeout()

It seems that this setting is not being honored.  We set it with the
following code:

<paste begin>
// Load the appropriate data access driver.
Class.forName(properties.getDriverName());

DriverManager.setLoginTimeout( 5 );

// Connection
return DriverManager.getConnection(properties.getUrl(),
properties.getUserId(), properties.getPassword());
<paste end>

However, it does not seem to work.  Rather than timing out after 5
seconds, it takes about 3 minutes.

Can anyone confirm if the DB2 JDBC Drivers support LoginTimeout?

Thx.
Bernd Hohmann - 02 Jan 2007 19:17 GMT
> We are using UDB 8 with net drivers, and trying to set the connection
> timeout, by calling DriverManager.setLoginTimeout()

http://publib.boulder.ibm.com/infocenter/db2luw/v8/topic/com.ibm.db2.udb.doc/ad/
r0010294.htm


# DataSource.setLoginTimeout(int) is ignored
# 1 DriverManager.setLoginTimeout(int) is ignored

Bernd

Signature

What do you get when you cross a mail pigeon with a parrot ? Voice mail

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.