Wander over to commons and grab the commons-pool package. There is a KeyedObjectPool over there. Make the stylesheet the key and voila`!
On Sat, 1 Mar 2003 04:26, Ulrich Mayring wrote: > Hello, > > I'm using ECM and Excalibur Pool in an application. Once I use a > component in my app, it is put into the Pool, which is a good thing for > components that are expensive to initialize. Let's assume for example a > TransformerComponent, which basically holds a precompiled TRAX > Transformer (using a stylesheet compiler like XSLTC). This takes a full > 2-3 seconds to initialize. > > Now, obviously, every Transformer is unique in the sense that it > implements a specific stylesheet. When I get a Transformer from the Pool > I never know for which stylesheet this Transformer is. So I need a way > to say: "Give me a Transformer for stylesheet foo.xsl from the Pool." > > Is there a recommended way to do this or would that mean: > > - implementation of something like a ReferableComponent or > - use one Pool per Stylesheet > > Thanks in advance for any tips, > > Ulrich > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- Cheers, Peter Donald *------------------------------------------------------* | "Common sense is the collection of prejudices | | acquired by age 18. " -Albert Einstein | *------------------------------------------------------* --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
