|
Phil Steitz made changes - 11/May/07 02:33 AM
Thanks Phil.
We actually wanted the first scenario: the datasource to time out if there are no connections available from the pool and the max active has been reached. I did not know the default value of maxWait was -1 and did not check it. Yes I set it to be 5 seconds and it worked.
svn ci -m "Adding the Javadoc to state that getLoginTimeout and setLoginTimeout are NOT supported by BasicDataSource as per
Sending src/java/org/apache/commons/dbcp/BasicDataSource.java
Henri Yandell made changes - 12/Jun/07 06:25 PM
Benoit Lafontaine made changes - 27/Aug/07 03:32 PM
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Marking as 1.3 fix version. Javadoc (or enhancement) patches welcome.
If what you want is for the datasource to timeout rather than waiting indefinitely on a connection when all connections in the pool are busy, you can set the maxWait property, which is a pool property that controls how long the pool will wait for a an object to become available to return to the client. If what you really want is for the driver to timeout when the pool uses it to open a physical connection, you could try setting the loginTimeout in the connection URL provided to setUrl. It looks like the Oracle driver supports that, though I have not tried this.