The HttpSessionListener and HttpSessionAttributeListener are configured in the deployment descriptor. Therefore, even if a session attribute implements these interfaces, the sessionDestroyed() and attributeRemoved() methods will not be called on that attribute.
[SCJP2, SCWCD1.3, SCBCD]
posted 11 years ago
I don't know what the context that paragraph comes from, but I think it means it's not enough that the class implements the interfaces, it also needs to be registered in the web.xml in order for the listener to work.