Neal,
I have never worked with XSLT but I can show you the way where you can have
an
initial copy of ServletContext which you can use independently.
Interface ServletContext has a mathod called
getContext(java.lang.String uripath) returns ServletContext
You can use this method by giving uripath of same application to get a copy
of cache.
I hope, This suggestion may help you.
Siddharth
----- Original Message -----
From: neal <[EMAIL PROTECTED]>
To: Tomcat Users List <[EMAIL PROTECTED]>
Sent: Wednesday, September 18, 2002 9:52 AM
Subject: Caching / Cloning
> Is there a way to make a copy of what's in my cache (getServletContext())
> and make changes to that local copy, independent of whether the cached
> object implements Cloneable()?
>
>
> In order to speed up my XSLT I thought I would preload them (their
> Transformer objects) into app scope and simply retrieve it as needed for
> transforms.
>
> This works fine except I just remembered that I need to set attributes on
> these XsLT Transformer objects. Now, I am PRESUMING that this means that
I
> would then be locking up the servlet context each time I set one of these
> parameters so then it seems I should clone() the object locally. That way
I
> could set the params locally without affecting (or locking) the cached
> version). BUT Transfomer does not appear to implement the Cloneable()
> interface.
>
> Is there a way around this? Am I by any chance wrong about what's
actually
> happening here? Can anyone make a suggestion?
>
> Here's what I'm doing basically:
>
> ServletContext application = getServletContext();
> application.setAttribute("TEMPLATES_HASH",templates);
> (where templates is a Hashtable containing Transformer objects)
>
>
> Thanks.
> Neal
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>