avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcus Crafter <craft...@fztig938.bank.dresdner.net>
Subject Pooling code && 1 object
Date Fri, 07 Dec 2001 17:17:25 GMT
Hi All,

	Hope all is well.

	I've been doing some testing with one of the pooled Cocoon
	components, part of which was to reduce the size of the pool
	managing access to be only one object (wanted to see what
	happened when the object was not correctly recycled).

	I did this with pool-max="1" pool-min="1".

	What I noticed then is that the pooling code always
	decommissioned this one object and created a new one every time
	it was needed.

	After looking into DefaultPool.java I found at line 234:

	if( (this.size() >= m_max) && (this instanceof Resizable) )
	{
		this.internalShrink( m_controller.shrink() );
	}

	ie. when size() (active + ready, in this case = 1) >= m_max (in this
	case = 1) then shrink.

	This means we're always reducing our pools by 1 when they are reach
	capacity -> Is this a bug ? or have I missed something here ?

	Cheers,

	Marcus
-- 
        .....
     ,,$$$$$$$$$,      Marcus Crafter
    ;$'      '$$$$:    Computer Systems Engineer
    $:         $$$$:   ManageSoft GmbH
     $       o_)$$$:   82-84 Mainzer Landstrasse
     ;$,    _/\ &&:'   60327 Frankfurt Germany
       '     /( &&&
           \_&&&&'     Email : Marcus.Crafter@managesoft.com
          &&&&.        Business Hours : +49 69 9757 200
    &&&&&&&:

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


Mime
View raw message