|
Problem(Abstract) |
What is the differences between the servlet 2.2 Javadoc
and the 2.3 Javadoc for the HttpSession.setAttribute() method as it
relates to the objects that implement the HttpSessionBindingListener
interface? |
|
|
|
Resolving the
problem |
- In the servlet 2.2 Javadoc for HttpSession, the method
setAttribute states:
If an object of the same name is already bound to the session, the
object is replaced. After this method executes, and if the object
implements HttpSessionBindingListener, the container calls
HttpSessionBindingListener.valueBound.
- In the servlet 2.3 Javadoc for HttpSession, the method
setAttribute states:
If an object was already bound to this session of this name that
implements HttpSessionBindingListener, its
HttpSessionBindingListener.valueUnbound method is called.
- Additional Notes:
Some implementations of WebSphere® Application Server V4.0 use
HttpSessionBindingListener.valueBound to know when a session object was
being invalidated. This method will still be called when the session
object is being invalidated but the implementation might also have a class
that implements the HttpSessionListener
Interface to be notified when the session is being destroyed.
|
|
|
|