The moose likes JDBC and Relational Databases and the fly likes Connection wait timeout Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Connection wait timeout" Watch "Connection wait timeout" New topic

Connection wait timeout

Gabriel Beres
Ranch Hand

Joined: Sep 09, 2006
Posts: 61

Could some expert explain me the purpose of CONNECTION_WAIT_TIMEOUT JDBC parameter?
What should be the typical value for this? In my application it is set to 2000.

Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3753

Google is your friend:

"The connection wait timeout specifies how long an application request waits to obtain a connection if there are no longer any connections in the pool. A connection pool runs out of connections if all connections in the pool are being used (borrowed) and if the pool size has reached it's maximum connection capacity as specified by the maximum pool size property. The request receives an SQL exception if the timeout value is reached. The application can then retry getting a connection. This timeout feature improves overall application usability by minimizing the amount of time an application is blocked and provides the ability to implement a graceful recovery."

[OCA 8 Book] [Blog]
I agree. Here's the link:
subject: Connection wait timeout
It's not a secret anymore!