avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leif Mortenson <l...@silveregg.co.jp>
Subject Re: maxStrict not available for ResourceLimitingJdbcDataSource?
Date Fri, 22 Feb 2002 09:29:23 GMT
Applied Thanks!

Mark Woon wrote:

>Is there a reason why the ResourceLimitingJdbcDatasource doesn't allow
>maxStrict parameter to the ResourceLimitingPool to be configured?
>Without it, the only difference between the
>ResourceLimitingJdbcDataSource and the JdbcDataSource is that the former
>will allow you to block if max connections has been met.
I guess there is no reason not to allow the max-strict attribute to be 
set, but I can not imagine
where you would want to use it.  Database connections will always have 
an upper limit on the number
of connections that you can open to the database.  The JdbcDataSource 
class will open up to max
and keep them open.  In that case, it would be useful.  But the 
supports pool trimming so the size will never be larger than is really 
needed.  If your application will
usually only need 3 connections, but you can allow up to 10, then set 
max=10.  The pool will
grow if necessary, but will quickly drop back down to 3 when the extra 7 
are no longer needed.
If you set max-strict=false, then under very heavy DB loads, your 
database may crash because your
app server tries to open up a very large number of connections.  In a 
way, max-strict=false takes the
safety off and puts your DB at risk.   MySQL will crash in short order 
under these circumstances
for example.

For this reason, I modified your patch to explain these issues.


To unsubscribe, e-mail:   <mailto:avalon-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org>

View raw message