Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

Re: what *really* happens when you reload or stop/start a webapp?

QM

2003-12-30

Replies:

: would everything get dumped and reset -- would that static variable go
: back to it's original state when the class file is first loaded?
:
: I should probably be asking a more specific question about classloaders
: and sandboxes and whatnot, but I'm not sure how this stuff works in
: tomcat and I'm not familiar w/ classloaders beyond their basic operation.

I'm not familiar with how the manager app "reloads" apps, but you
could perform an experiment to find out:

If you already have such a static var in question, write a quick JSP
that prints that value to screen. Fire up your app, hit this JSP (to
catch the initial/default value).

Call the servlet/whatever that changes that value.

Next, reload Tomcat using the manager app.

Hit the JSP again (make sure to force a reload in your browser).
Compare the printed value to the original/default.


Also, is there any reason you require this to be a static variable?

-QM

--

software -- http://www.brandxdev.net (C++ / Java / SSL)
tech news -- http://www.RoarNetworX.com


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)



©2008 junlu.com - Jax Systems, LLC, U.S.A.