When an object is added or removed from a session, the container checks the interfaces implemented by the object. If the object implements the HttpSessionBindingListener, the container calls the matching notification method.
If session is added then sessionCreated() method, and if session is removed then sessionDestroyed() method will be callled automatically by the web container.