tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <Yoav.Shap...@mpi.com>
Subject RE: getResourceAsStream cached by Tomcat's Classloader?
Date Thu, 05 Jun 2003 15:24:39 GMT

Howdy,

>When I load my-config.xml using
>Classloader.getResourceAsStream("my-config.xml") everything works
great.
>However, when I make a change to that file and again call
>Classloader.getResourceAsStream("my-config.xml") the changes are not
picked
>up and the same initial resource is returned. How do I get the
Classloader
>to reconginze the resource changes? I'm using Tomcat 4.1.18.

I haven't looked at that code for a while myself, but I wouldn't be
surprised if that were cached.  It'd be a performance win, especially
for frequently accessed resources.  I don't think the servlet
specification mandates resource caching, nor mandates that it be
configurable -- both of these are container implementation details.

I would guess that if you restart your webapp, the resource cache would
be reset.  But that may not be what you want to do...

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.


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


Mime
View raw message