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...@osa.de> on 2001/12/08 18:23:36 UTC

[patch] DefaultPool fix (was Re: Pooling code && 1 object)

Hi All,

	Hope all is well.

	After playing around with the Excalibur code in jswat I was able
	to validate what was going on inside the pooling code when a
	pool reaches it's maximum capacity.

	With the current code, pools shrink everytime they are full (ie.
	everytime they reach capacity, but not exceed it). I'm not sure
	if this was intended ? (please correct me if I'm wrong) but IMO I think
	this is different than expected by a developer.

	Attached is a patch to fix DefaultPool so that pools are reduced
	in size only when they exceed capacity, not when they reach it. Hope
	it's ok.

	I've also attached the test program I wrote to validate the fix
	just in case someone else would like to check it.

	Cheers,

	Marcus

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

Re: [patch] DefaultPool fix (was Re: Pooling code && 1 object)

Posted by Berin Loritsch <bl...@apache.org>.
Peter Donald wrote:

> Sounds good to me ... Berin ?
> 
> On Sun, 9 Dec 2001 04:23, Marcus Crafter wrote:
> 
>>Hi All,
>>
>>	Hope all is well.
>>
>>	After playing around with the Excalibur code in jswat I was able
>>	to validate what was going on inside the pooling code when a
>>	pool reaches it's maximum capacity.
>>
>>	With the current code, pools shrink everytime they are full (ie.
>>	everytime they reach capacity, but not exceed it). I'm not sure
>>	if this was intended ? (please correct me if I'm wrong) but IMO I think
>>	this is different than expected by a developer.
>>
>>	Attached is a patch to fix DefaultPool so that pools are reduced
>>	in size only when they exceed capacity, not when they reach it. Hope
>>	it's ok.
>>
>>	I've also attached the test program I wrote to validate the fix
>>	just in case someone else would like to check it.
>>
>>	Cheers,
>>
>>	Marcus
>>
> 

Sounds good, I just have to find the patch...

-- 

"They that give up essential liberty to obtain a little temporary safety
  deserve neither liberty nor safety."
                 - Benjamin Franklin


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [patch] DefaultPool fix (was Re: Pooling code && 1 object)

Posted by Peter Donald <pe...@apache.org>.
Sounds good to me ... Berin ?

On Sun, 9 Dec 2001 04:23, Marcus Crafter wrote:
> Hi All,
>
> 	Hope all is well.
>
> 	After playing around with the Excalibur code in jswat I was able
> 	to validate what was going on inside the pooling code when a
> 	pool reaches it's maximum capacity.
>
> 	With the current code, pools shrink everytime they are full (ie.
> 	everytime they reach capacity, but not exceed it). I'm not sure
> 	if this was intended ? (please correct me if I'm wrong) but IMO I think
> 	this is different than expected by a developer.
>
> 	Attached is a patch to fix DefaultPool so that pools are reduced
> 	in size only when they exceed capacity, not when they reach it. Hope
> 	it's ok.
>
> 	I've also attached the test program I wrote to validate the fix
> 	just in case someone else would like to check it.
>
> 	Cheers,
>
> 	Marcus

-- 
Cheers,

Pete

*-----------------------------------------------------*
| For those who refuse to understand, no explanation  |
| will ever suffice. For those who refuse to believe, |
| no evidence will ever suffice.                      |
*-----------------------------------------------------*

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>