| Summary: | HashSessionManager deIdling invokes HttpSessionAttributeListener.attributeAdded without having invoked attributeRemoved | ||
|---|---|---|---|
| Product: | [RT] Jetty | Reporter: | Roger Armstrong <roger> |
| Component: | server | Assignee: | Greg Wilkins <gregw> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | jetty-inbox |
| Version: | unspecified | ||
| Target Milestone: | 7.2.x | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Roger Armstrong
Unfortunately there is no clear spec on what should happen. But we should at least try to be symmetric. I'll look for 7.4.1 The workaround is to make the attributeAdded listener idempotent, but its obviously non-intuitive behavior. I would suggest that the expected behavior is that attributeAdded would NOT be called during deIdling, analogous to the way in which the constructor and set methods of a serializable class are not called during deserialization. I have fixed this by making an idle call unbind and attributeRemoved listeners. This is what is done on a shutdown, so it is pretty similar and any bean that wants to release resources from such a callback needs to know. |