I have a object that implements the HttpSessionAttributeListener, and as you'd expect it does some work when certain objects are added, replaced and removed from the session.
I thought that the if the session is ended [session.invalidate()], each object from that session is removed from the session as so the attributeRemoved() method would be called? I'm not seeing that behavour and wondered if I dreamt it.
To ensure I can be notified when the session is invalidated do I have to implement HttpSessionBindingListener on the object i'm interested in? or is there another way.