tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brandon Goodin" <m...@phase.ws>
Subject RE: getResourceAsStream cached by Tomcat's Classloader?
Date Thu, 05 Jun 2003 15:41:59 GMT
I have tried it both ways. My notion is that it has to do with the fact that
the getResourceAsStream is being called in a static method and the resulting
InputStream, which is wrapped in an InputStreamReader, is passed into an
object that is a static variable in my BaseDAO class. So, because the
reference is at the Class level it might be holding onto it no matter what I
do. If you want I can show you the code. I have some ideas. But, I'm not
sure if they will work.

Brandon Goodin

-----Original Message-----
From: Larry Meadors [mailto:Larry.Meadors@plumcreek.com]
Sent: Thursday, June 05, 2003 8:58 AM
To: tomcat-user@jakarta.apache.org
Cc: mail@phase.ws
Subject: RE: getResourceAsStream cached by Tomcat's Classloader?


Hey Brandon,

Are you using this code to get a classloader?

Thread.currentThread().getContextClassLoader();

If not, you are not getting tomcat's you are getting the system one.

Larry

>>> mail@phase.ws 06/05/03 8:04 AM >>>
Yes, it is closed.

Brandon Goodin

-----Original Message-----
From: Dominic Parry [mailto:dom@rucus.ru.ac.za]
Sent: Thursday, June 05, 2003 7:44 AM
To: Tomcat Users List
Subject: Re: getResourceAsStream cached by Tomcat's Classloader?


did you close the original stream before making changes and reloading?


----- Original Message -----
From: "Brandon Goodin" <mail@phase.ws>
To: <tomcat-user@jakarta.apache.org>
Sent: Thursday, June 05, 2003 3:45 PM
Subject: getResourceAsStream cached by Tomcat's Classloader?


> I saw a question similar to this asked in the Archives early in 2002.
I
> didn't see a response to it. So, I hope there is an answer.
>
> I have a generic config file that is an xml file. We'll call it
> my-config.xml.
>
> 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.
>
>
> Brandon Goodin
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>




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



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



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



---------------------------------------------------------------------
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