Bug 30344 - HttpSessionActivationListener[s] called before ServletContextListner[s] during HttpSession reloading
Summary: HttpSessionActivationListener[s] called before ServletContextListner[s] durin...
Alias: None
Product: Tomcat 5
Classification: Unclassified
Component: Unknown (show other bugs)
Version: 5.0.27
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2004-07-27 10:49 UTC by Tomasz Skutnik
Modified: 2004-11-16 19:05 UTC (History)
0 users

Test case: source files and prepackaged WAR (13.67 KB, application/octet-stream)
2004-07-27 10:54 UTC, Tomasz Skutnik

Note You need to log in before you can comment on or make changes to this bug.
Description Tomasz Skutnik 2004-07-27 10:49:41 UTC
During HttpSession reloading HttpSessionActivationListener[s] are notified
*before* ServletContextListner[s]. This occurs during Tomcat startup and context
reloading. IMHO this is a bug. Objects bound into HttpSession on session
activation (e.g. after distributed session migration or reloading) typically
expect that ServletContext is already created and properly configured - as in
distributed session migration scenario. Spec does not madate anything like that
explicitly, however my intuition is so (see SRV.3.7 in Servlet 2.4). I'll attach
test-case WAR after submission.
Comment 1 Tomasz Skutnik 2004-07-27 10:54:14 UTC
Created attachment 12237 [details]
Test case: source files and prepackaged WAR
Comment 2 Michael Südkamp 2004-09-06 07:56:40 UTC
Exactly my opinion. I also cannnot find anything in the spec 2.3 or 2.4 reg. 
this. So it's a spec problem not a Tomcat problem.

I would also expect that preloaded servlets have run before the 
sessionDidActivated() method is called.
Comment 3 Yoav Shapira 2004-09-08 20:17:03 UTC
We've agreed (after also discussing this on the mailing list) that it's a spec 
problem, so I'm closing it for now.  If the spec changes we'll of course reopen 
this item or create a new one, and make sure the Tomcat implementation obeys 
the spec.
Comment 4 msms843 2004-09-09 06:48:25 UTC
Yesterday I sent a problem report regarding this to 'jsr-154-comments@jcp.org'