You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Marcus Crafter <cr...@fztig938.bank.dresdner.net> on 2001/12/07 18:17:25 UTC

Pooling code && 1 object

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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Pooling code && 1 object

Posted by Marcus Crafter <cr...@fztig938.bank.dresdner.net>.
On Fri, Dec 07, 2001 at 06:17:25PM +0100, crafterm wrote:
> 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:

	Sorry, line 186.

	Cheers,

	M.

-- 
        .....
     ,,$$$$$$$$$,      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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>