Hi Corey, On Sun, Jun 23, 2002 at 11:05:55PM -0700, Corey Jewett wrote: > Is there an existing mechanism that allows a pool of arbitrary objects > to be created and utilized in a standard manner. The class to be pooled > would implement the Poolable interface. > > Example: > > public ClassA implements Configurable, Poolable, Recyclable, > SingleThreaded { > public void configure (Configuration conf) throws > ConfigurationException { > // Time consuming configuration. > } > > public Object myMethod () { > // do something. > } > } > > In my configuration.xconf: > > <arbitrary-classA-pool min="5" max="25" useHardLimiting="true"> > <config> > <delta>5</delta> > </config> > </arbitrary-classA-pool> > > Is there an existing way to do this? If not are there limitations (in > Avalon or otherwise) that have prevented this from being done?
Yes, IIUYC. In fact, what you describe is the current way its done, only that in your example above, you can't implement both Poolable and SingleThreaded as they are conflicting lifestyles. You need to implement just Poolable in your concrete class, and that should be it. The tuning parameters and an example configuration is available at: http://jakarta.apache.org/avalon/excalibur/api/org/apache/avalon/excalibur/component/PoolableComponentHandler.html (assuming your using ECM, please let me know if you're not). Hope that helps. Cheers, Marcus -- ..... ,,$$$$$$$$$, Marcus Crafter ;$' '$$$$: Computer Systems Engineer $: $$$$: ManageSoft GmbH $ o_)$$$: 82-84 Mainzer Landstrasse ;$, _/\ &&:' 60327 Frankfurt Germany ' /( &&& \_&&&&' &&&&. &&&&&&&: -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>