HI everyone,
We are using the BasicDataSource in many projects to connect to an Oracle cluster. We configure the ValidationQuery (select * from dual) and a Connection Pool (Min 1, MaxIdle 10, Max Active 50). 1st: When I set the LoginTimeout in the datasource, I get an UnsupportedException. It would have been useful. 2nd: If the network is lost, the DataSource.getConnection() method hangs because of the validationQuery which does not use any timeout. But the OCI driver raises a TCP Timeout. 3nd: In the case our Oracle server freeze and the Listener do not, the Connection are still up, but again the ValidationQuery hangs and this time the no TCP timeout is reached, and the application waits forever. The only thing that was working is the MaxWait when the MaxActive Limit is reached; an Exception rose to tell me it was not able to get an Idle connection from the pool. It's just sad that when this occurs, the 50 previous requests are still frost (maxActive = 50). In the case I want to protect my application from such errors, by configuring a connection and read timeout on the connection initialization and all subsequent queries, I wonder if anyone has some advice or example on how to achieve this with commons-dbcp? (I see some bugs I described here are logged on ASF's Jira and schedule for 1.3, but I can't possibly wait for the release). Thanks to any help/advice.