db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Armin Waibel <ar...@code-au-lait.de>
Subject Re: maxActive for connection-pool
Date Fri, 21 Nov 2003 01:18:29 GMT
Hi Lance,

yeah, seems to be overcautious ;-)
Put this on my todo list. PoolConfiguration
need some more refactoring (avoid use of deprecated
classes). Think PoolInfo need to be removed.

regards,
Armin

Lance Eason wrote:
> The site documentation says you can specify maxActive as less that 0 to indicate unlimited:
> 
>    "maximum number of connections that can be borrowed from the pool at one time. When
non-positive, there is no limit."
> 
> Yet PoolInfo and PoolConfiguration explicitly prevent this:
> 
> PoolInfo:
>     public void setMaxActive(int maxActive)
>     {
>         if (maxActive > 0)
>         {
>             this.setProperty(MAX_ACTIVE, EMPTY + maxActive);
>         }
>         else
>         {
>             LoggerFactory.getDefaultLogger().error("Size for connection pool must >
0. Value was " + maxActive);
>         }
>     }
> 
> PoolConfiguration:
>     public void setMaxActive(int maxActive)
>     {
>         if(maxActive > 0)
>         {
>             this.maxActive = maxActive;
>         }
>         else
>         {
>             LoggerFactory.getDefaultLogger().error("Size for connection pool must >
0. Value was "+maxActive);
>         }
>     }
> 
> All implementations of the connection pool seem to use GenericObjectPool which handles
maxActive as specified in the documentation.  Shouldn't this check be removed?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
> 
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message