Entity class implements serialization

  Abstract: About HttpSession object serialization reasons related entity class

This article is taken: https://blog.csdn.net/qq_18298439/article/details/80607057

  When a client visits a conversation function can be turned on resources, web server will create HTTPSession object corresponding to the client, each HTTPSession objects must take up some memory space, if access at a certain period of time many users, web server memory will accumulate a large number of objects HTTPSession, consume a large amount of server memory, has left a timely manner or closes the browser, the web server object remains still corresponding with HTTPSession, has been occupied by the web server before they timeout memory resources.

 

  web server typically those temporary inactivity timeout HTTPSession but the object is transferred to the file system or stored in the database, the server you want to use them again when they are loaded into memory from the file system or database, this technique is called Session Persistence of.

 

  HttpSession object saved to the file system or database sequence need of each attribute HTTPSSession way to play the stored object to a file system or database, when HTTPSession object from the database or the file system is loaded into memory needs using deserialized manner, to recover each attribute object HTTPSession object, each object is stored in the attribute HTTPSession object must implement serializable

Guess you like

Origin www.cnblogs.com/liuqijia/p/11416285.html