avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@apache.org>
Subject Re: [Vote][Excalibur] Component Pools
Date Tue, 12 Jun 2001 12:43:13 GMT
Seems like a reasonable change though I don't use it so I couldn't tell you
accurately. Berin/Cocooners could probably give you a better appraisal. 

Personally I would be interested in seeing ComponentHandler static as non
static and instead implemented by some form of
ComponentHandlerFactory/Manager.  I would also be interested in seeing the
type of pool customizable in all sorts of manner.

However as I said I don't use it so can't say how feasible this is ;) 


At 10:24 AM 6/12/01 +0200, Leo Sutic wrote:
>the Excalibur component manager has a severe fault: It is not possible to
>choose the size of the component pools. (Nor is it possible to subclass the
>PoolableComponentHandler in a neat way as the m_pool member is private and
>thus not accessible for subclasses.)
>This means that in a heavily multithreaded environment (40+ threads), the
>pool will (almost) always try to create new component instances, degrading
>performance and leading to:
>java.lang.Exception: Could not create enough Components to service your
>	at org.apache.avalon.excalibur.pool.DefaultPool.get(DefaultPool.java:135)
>	at
>	at
>The solution I see is:
>Include "hints" in the Configuration object sent to the component
>manager/handler. For example, we could let the attributes
>excalibur:poolMaxSize, and excalibur:poolMinSize specify the maximum and
>minimum sizes of the pool. The default values would be as in the
>AbstractPool (the current defaults). The advantages are:
>  + Unchanged (Java) interface to the component manager, preserving binary
>  + Easily configurable pool parameters.
>  - Creates some "magic attributes".
>  - Changes interface of DefaultComponentPool, PoolableComponentHandler
>So I'd like to call for a vote on this. Should the ExcaliburComponentManager
>and related classes be changed to accept these attributes in the
>Configuration object passed to the addComponent method?
>I also keep getting these, and I am certain that I'm *not* trying to release
>a component that I have not obtained through the same component manager:
>WARN    44153   [cocoon  ] (Thread-18): Pool interrupted while waiting for
>java.lang.IndexOutOfBoundsException: Index: -1, Size: 50
>	at java.util.ArrayList.RangeCheck(ArrayList.java:491)
>	at java.util.ArrayList.remove(ArrayList.java:375)
>	at org.apache.avalon.excalibur.pool.DefaultPool.put(DefaultPool.java:174)
>	at
>	at
>To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: avalon-dev-help@jakarta.apache.org


| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |

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

View raw message