Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Connection timeout value for DB2 db

 
Srinivasa Raghavan
Ranch Hand
Posts: 1228
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34372
345
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Srinivasa Raghavan
Ranch Hand
Posts: 1228
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where can we get the idle time ? Is it dependent on the driver ?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34372
345
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Srinivasa,
It's set up in your datasource or connection pool. Check that documentation for the default.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic