Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.3
-
None
Description
As reported by Steve Ronderos, the OC4J servlet container does not call removeAttribute on session attributes when the session is invalidated. This means that the ConversationManagerSessionListener does not remove ConversationManager instances from the ConversationWiperThread when the owning session is destroyed.
This is possibly a bug in OC4J; the servlet specs aren't entirely clear what should happen when a session is invalidated but it seems that the HttpSessionBindingListener javadoc does imply that removeAttribute should be called. Apache Tomcat certainly does call removeAttribute (see method StandardSession.removeAttributeInternal for details).
Regardless of whether this is a servlet-engine bug or not, this is something that it would be nice to handle.
One option would be to use weak references in the ConversationWiperThread. Another would be for ConversationManagerSessionListener to implement the HttpSessionListener interface and use the sessionDestroyed callback to scan for ConversationManager instances and remove them from the wiper thread.