The Servlet 2.2 spec explicitly says that the
HttpSessionBindlingListener.valueUnbound() method should be called when
HttpSession.removeValue() is invoked. But it's silent with respect to
calling HttpSessionBindlingListener.valueUnbound() when
HttpSession.putValue() is used to *replace* a value.

I want to persist my session data on calls to valueBound() (as described in
the spec) and release resources on calls to valueUnbound().  However, when I
call HttpSession.putValue() to replace my session data and thus trigger the
persisting of the data, my valueUnbound() method is called first and it
releases the resources before they can be persisted.

Is this a bug in my servlet container or is it the expected behavior?  I can
see how one could argue that this is correct, but I can also see an argument
for the other case (only removeValue() calls valueUnbound()).  I can work
with either implementation, I just want to know what the "standard" is so
that I can remain portable.  Will/Can this be clarified by the 2.3 spec?

David

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to