db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lance Eason" <lance.ea...@whisperwire.com>
Subject maxActive for connection-pool
Date Fri, 21 Nov 2003 01:02:41 GMT
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


Mime
View raw message