| Summary: | Sessions should be passivated *before* being serialized to disk | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [RT] Jetty | Reporter: | Eirik Bjørsnøs <eirbjo> | ||||
| Component: | server | Assignee: | Greg Wilkins <gregw> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | jetty-inbox, mgorovoy | ||||
| Version: | unspecified | ||||||
| Target Milestone: | 7.1.x | ||||||
| Hardware: | Macintosh | ||||||
| OS: | Mac OS X - Carbon (unsup.) | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Eirik Bjørsnøs
Looking at this a little closer, I can't see Jetty ever calling willPassivate on a session in the current HashSessionManager since it's protected by an if(!invalidate) and invalidate seems to be true always. Created attachment 175557 [details]
Test webapp which demonstrates that sessionWillPassivate is never called
Simple webapp used for demonstrating HttpSessionActivationListeners being not being called before serialization. Or actually not being called at all.
So I'm going to commit a patch that calls willPassivate before is saves sessions and didActivate after it restores sessions. But it is a truly horrible specification... we can run in a mode where we save a session periodically - so we will now call willPassivate before the save and didActivate after the save. But there is no locking to prevent other requests hitting the session during this time. Likewise, after a session is restored, there is nothing to prevent other requests hitting the session before didActivate is called. I'm just running some tests to confirm I've not broken anything, then I will commit. jetty-7.2.0.RC0 1 October 2010 |