You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Chino Aureus <ch...@gmail.com> on 2009/09/24 09:37:40 UTC
Maintaining number of connections
Hi,
I have this settings below. I wish to maintain the number of connections in
case all connections are idle. However,
what happens was dbcp evicts all connections and creates new ones. I there
way to maintain the connections without reconnecting when idle ?
Also, I wish that dbcp will reconnect a connect in case of timeout or
SQLException while maintaining the desired number of connections which in
case below is 10:
db.datasource.driverClassName=oracle.jdbc.OracleDriver
db.datasource.url=jdbc:oracle:thin:@10.1.1.1:1521:db2
db.datasource.username=user
db.datasource.password=pass
db.datasource.initialSize=10
db.datasource.maxActive=10
db.datasource.maxIdle=10
db.datasource.minIdle=10
db.datasource.maxWait=1000
db.datasource.numTestsPerEvictionRun=10
db.datasource.maxOpenPreparedStatements=0
db.datasource.poolPreparedStatements=true
db.datasource.validationQuery=SELECT 1 from DUAL
db.datasource.testOnBorrow=true
db.datasource.testOnReturn=false
db.datasource.testWhileIdle=true
db.datasource.timeBetweenEvictionRunsMillis=10000
db.datasource.numTestsPerEvictionRun=10
db.datasource.minEvictableIdleTimeMillis=25000
Thanks,
:)