Objects that are bound to a session may listen to container events notifying them that sessions will be passivated and that session will be activated. A container that migrates session between VMs or persists sessions is required to notify all attributes bound to sessions implementing HttpSessionActivationListener.
JavaDoc:javax.servlet.http.HttpSessionActivationListener
JavaDoc:javax.servlet.http.HttpSessionActivationListener