Hello,

I am starting to use the dbcp and even though I've managed to set-up the
pool and get/release connections successfully it seems that there is a
problem with the eviction mechanism. The way in which I create my pool
is:

GenericObjectPool connectionPool = new
GenericObjectPool(null,poolConfiguration);
DriverManagerConnectionFactory connectionFactory = new
DriverManagerConnectionFactory(connectURI, null);
PoolableConnectionFactory poolableConnectionFactory = new
PoolableConnectionFactory(connectionFactory, connectionPool, null,
testConnectionSql, false, true);
poolingDataSource = new PoolingDataSource(connectionPool);

(* poolConfiguration is a GenericObjectPool.Config file, properly set /
testConnectionSql is "select count(*) from dual" (I currently work with
an Oracle DB). All other parameters are also well set-up and tested.)

I have a maxActive=5, maxIdle=2, testWhileIdle=true,
timeBetweenEvictionRuns=5000 and minEvictableIdleTime=500.

a) I get 5 connections and then I Thread.sleep for 30 seconds before
closing the obtained connections. On the same time I monitor the number
of open sessions on my DB which is ALWAYS 5. Shouldn't this number be
reduced to '2' after the 5000millis (when eviction mechanism initiates)?
b) When I return the 5 connections shouldn't the 5 sessions(or 2 in the
case the eviction was working) stay open? In my db monitor I see that
all of them close.
c) If I set testWhileIdle=true the sessions on (b) stay - correctly -
open. 


Any help would be greatly appreciated since I'm "almost" there.


thank you,

Nassos


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to