wood burning stoves 2.0*
The moose likes Servlets and the fly likes Is there a limit to the size of object that can be kept in a session? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Is there a limit to the size of object that can be kept in a session?" Watch "Is there a limit to the size of object that can be kept in a session?" New topic
Author

Is there a limit to the size of object that can be kept in a session?

Rajesh Khan
Ranch Hand

Joined: Oct 16, 2011
Posts: 230
Is there a limit to the size of object that can be kept in a session?
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18911
    
    8

Of course there isn't a rule in the servlet specification which says something like "Objects exceeding 12,839 bytes may not be stored in a session".

However from a practical point of view, if you store large objects in a session and you have a lot of users, and hence a lot of sessions, then you may be using too much memory. Of course "large" and "too much" have to be interpreted in terms of how much memory you have available to run your servlet container, and whether your sessions are shared among servers in a cluster, and various other things.
 
 
subject: Is there a limit to the size of object that can be kept in a session?