-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Eric,

Eric Daniel wrote:
| In short: should I expect running threads to finish processing their
| requests, when I reload an application?

Yes. Check the servlet specification which, well, specifies this behavior.

| Long story: we use tomcat as an application server, and a request can
| take up to several minutes to finish. We would like to be able to reload
| the application, and have any running thread finish its work, while new
| threads can be spawned using the new versions of the classes.
|
| This seems to mostly work, except that upon reload, all static class
| members of old class instances are set to Null! So old requests try to
| finish but quickly die as soon as the code tries to access the private
| members. New requests are fine, the freshly-loaded classes have their
| static members initialized correctly.

Hmm... I would not have predicted that behavior. Are you doing anything
strange like creating your own threads to handle these long-running
requests? The container is supposed to finish all requests before taking
the webapp out of service. I'm pretty sure that the old webapp should be
taken out of service before the new one takes its place. That would
indicate that you are either monkeying with your own threads (which keep
references to the old webapps) or there is a bug in Tomcat, or Tomcat
cheats a little during reloads to gain some sort of performance benefit
(which I doubt).

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkfR/xQACgkQ9CaO5/Lv0PBoOgCffQVjbhuBDx1zj+0fRd9PWBnm
mf8An0/WJuorhg+E86WTpUHtDV8eCgcM
=oQxE
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to