It's not a secret anymore!
The moose likes Servlets and the fly likes capacity of session object Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "capacity of session object" Watch "capacity of session object" New topic

capacity of session object

plr kannan

Joined: Jan 15, 2001
Posts: 4
what is the capacity of object that a session can have?
what is the size of the object obj can be?
is than any restriction that it should be<4k?

William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13037
There is no size limit imposed by the HttpSession class - you would be well advised to consider the memory consumption,
and the amount of time the session will hang around in memory.
Some servlet engines will serialize a session out to disk - you must ensure that all of the parts are serializable. You should not store objects that use system resources such as database connections for that reason.

author of:
I agree. Here's the link:
subject: capacity of session object
It's not a secret anymore!