DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=18479>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=18479

HttpSessionBindingListener.valueUnbound() not called





------- Additional Comments From [EMAIL PROTECTED]  2004-04-13 05:22 -------
You were right, Remy,

After some investigation, I figured out that one of the packages I was using
added a session attribute whose job was to react to cases where it had its
valueUnbound() method called and do some cleanup.  However, it was set as an
anonymous HttpSessionBindingListener which (obviously) doesn't implement
Serializable.  Besides that, the class in which the anonymous class was created
is not serializable and if you do a toString() on the session value that was
created, you get the name of the containing class, so I think the containing
class would have to be serializable here as well.  In any case, the alternative
method would be to just use a SessionListener#sessionDestroyed() method to do
the cleanup.  I think the former method was used because the session is already
destroyed in Jetty by the time sessionDestroyed() is called (I think that's
right?) making cleanup in sessionDestroyed() impossible (That's got to be bad
behavior on Jetty's part, but this needs to work with all containers, hence the
workaround).  Everything worked under Tomcat after I moved to using
sessionDestroyed() to do the cleanup.

However, shouldn't valueUnbound() be called on the non-serializable attribute
value when it is removed from the session HashTable?  Actually, isn't that
exactly what this bug is about?  If so, isn't this bug not really fixed?  At the
very least, some logging should be done to tell me what happening.  I wouldn't
have even have started asking questions here if Tomcat had provided me with some
hint of what it was doing instead of silently removing non-serializable attributes.


Jake

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to