1) In the first test of jdiscuss.com there is a question about listeners being notified when an attribute is replaced, and the HttpSessionBindingListener is not supposed to be notified (in their answer) but in my example it is notified; is this Tomcat-specific or it is normal since a replacement = old valueUnbound + new valueBound? (not found in the spec)
2) The HFSJ(p.263) and the api say that HttpSessionBindingEvent.getValue() returns the OLD object value. In my example, this is true only if I comment out "implements HttpSessionBindingListener" in the Dog's class declaration (i.e. the only listener is now the HttpSessionAttributeListener). In this case, the output is, as expected:
setting attributeAdded() value=Fido
replacing attributeReplaced() value=Fido
removing attributeRemoved() value=NewFido
BUT if I let the Dog class implement the HttpSessionBindingListener, the output becomes:
The result depends on the time when the 'HttpSessionBindingEvent' object is created by the container...
In the second case it is happening little late for attributeReplaced method, mean time the 'value' property of the event is updated for 'valueBound' method. There r lot of issues effecting this...but sorry,I can't explain all
This is just my observation...I hope u understand this...
[ March 26, 2006: Message edited by: Mahendar Reddy ]