• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

capacity of session object

 
plr kannan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the capacity of object that a session can have?
session.setAtribute("name",obj);
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
Rancher
Posts: 13064
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
Bill

------------------
author of:
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic