I am not sure I understand oracle or commons doc correctly. There is a method called setCacheScheme in OracleConnectionCacheImpl. According to oracle JDBC developer's guide:
The OracleConnectionCacheImpl class supports three connection cache schemes. Use these schemes in situations where (1) the application has requested a connection, (2) all existing pooled connections are in use, and (3) the maximum number of pooled connections in the cache have been reached. - dynamic In this default scheme, you can create new pooled connections above and beyond the maximum limit, but each one is automatically closed and freed as soon as the logical connection instance that it provided is no longer in use. (As opposed to the normal scenario when a pooled connection instance is finished being used, where it is returned to the available cache.) For example, set maxLimit to 10, set cacheScheme to dynamic and OracleConnectionCacheImpl has borrowed 10 pooled connections from the cache (pool), if I request for a conection, oracle impl will automatically create a new one (11th). This one will be destroyed after use. For DBCP, my understanding is maxIdle + maxActive = total connections can be created But this "total" has limit = maxActive. -----Original Message----- From: Dirk Verbeeck [mailto:[EMAIL PROTECTED] Sent: September 22, 2003 4:46 PM To: Jakarta Commons Users List Subject: Re: [DBCP] Timeout for creating a new connection MaxActive is the maximum number of active connections, a hard limit to protect the database from an overload of connections. The think you describe is the MaxIdle limit. MaxIdle is the maximum number of connections that can be in the pool at any given time (not counting the connections in use). When there are no connections left in the pool (all are in use) then new connections will be created. Taking into account the hard limit on the total number of connections (=MaxActive) of course. When the usage goes down (and the connections return to the pool) only a fixed amount will be allowed back into the pool (=MaxIdle). The remaining connections will be destroyed. Quite similar I think. Maybe there is a difference in language. When I say in the pool I mean idle/unused connections. The active/used connections are borrowed from the pool and not in the pool anymore. Later, they are returned to the pool. Hmm, I hope this make some sense ;-) Cheers Dirk Phillip Qin wrote: >I tested both oracle's connection cache and commons-dbcp+pool. I think >commons dbcp+pool are great products. But I still miss one nice feature on >oracle. Oracle connection pool can automatically increase num of connections >when max active is exceeded and decrease to max when usage is down. > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
