Why is it considered a good practice to make session scoped objects Serializable?

只愿长相守 提交于 2019-12-04 17:13:02

This allows the servlet container to either store the contents of a session on disk, or to transfer session contents over the network to another server.

Why does the container need to store session on the disk (passivation)? Perhaps when the memory is full. When the session is needed again, it retrieves it from the disk back into memory (activation).

http://www.javapractices.com/topic/TopicAction.do?Id=110

It allows container to move the session objects over the network or store them on a disk. It will helpful when you cluster your application with different nodes of server running in different physical boxes.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!