In the first case the valueBound as specified by you . In the second case valueUnbound. In the 3rd case none of the events are called since it does not involve any modification in the session or the object class (Dog)
Also in the first case attributeAdded of HttpSessionAttributeListener is called In the second case attributeRemoved of HttpSessionAttributeListener is called And if we do session.setAttribute("dog",newDog); then attributeReplaced method is called
So in the first two case two methods are called
Hope this helps
posted 11 years ago
Also in the first case
setAttribute(key, object) - if the key already exists in the session, container calls valueUnbound of the old object first, then valueBound of the new object.. Let me know if this is wrong..
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads