aspose file tools*
The moose likes JDBC and the fly likes Connection timeout value for DB2 db Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Connection timeout value for DB2 db " Watch "Connection timeout value for DB2 db " New topic
Author

Connection timeout value for DB2 db

Srinivasa Raghavan
Ranch Hand

Joined: Sep 28, 2004
Posts: 1228
Is there any default connection time out value for the connection object ?

I have a process that runs continously for 6 days. I create the connection object on the first day & close it only when this process shuts down. Is there any chance that it gets timed out after some time ?

Ps: connection is for DB2 database & I use type 4 driver


Thanks & regards, Srini
MCP, SCJP-1.4, NCFM (Financial Markets), Oracle 9i - SQL ( 1Z0-007 ), ITIL Certified
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29283
    
140

It usually goes by idle time, not total time.

Consider using a connection pool so your application can recover if something goes wrong - like a network connection failing.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Srinivasa Raghavan
Ranch Hand

Joined: Sep 28, 2004
Posts: 1228
Where can we get the idle time ? Is it dependent on the driver ?
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29283
    
140

Srinivasa,
It's set up in your datasource or connection pool. Check that documentation for the default.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Connection timeout value for DB2 db
 
Similar Threads
Default Server restarts
Oracle connectivity goes down...
DB2
Setting Connection Time Out
JDBC to DB2 Mainframe - query timeout