Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AS400JDBCDriver connection timeout

Status
Not open for further replies.

jem122974

Programmer
Nov 1, 2001
114
0
0
US
How can I set the timeout limit? I would like the database connections to timeout if they are inactive for say 1/2 hour. I'm not even sure what the default is.

Thank you,
Jon Mitchell
 
AFAIK, it's the database who controls the connection inactivity timeout.

Cheers,
Dian
 
Hmmm... You are probably right. I was just hoping there as a way I could change it for just my application and not for all database connections.
 
Well, there's a way to set a inactivity timeout smaller than the database one.

The idea would be a class that manages all database accesses. The class would open the connection and set a timestamp for the last access. Then, another class in another thread would wait for the specified timeout and would close the connection.

But, IMHO, this is not an application issue. In fact, if you use an application server, you can define a timeout for each kind of connection.

Cheers,
Dian
 
Interesting thought, Dian. In fact I am using an application server - Glassfish. Can I do something in the web.xml? If you could just point me in the right direction I'd appreciate it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top