aspose file tools*
The moose likes Servlets and the fly likes Session question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Session question" Watch "Session question" New topic
Author

Session question

Daniel Silva
Greenhorn

Joined: Nov 10, 2003
Posts: 9
It's a good way to put a vector of Integer objects (near 200 records) in a session, how big is big a value to put in a session ??? Where it's start "crash" my application, This Vector for example of size 200 are informations that i'll need to read many times and don't change never for the user loged in the application, I thing it's the fast way for access, but it's will be not "crash" my application.
cheers
Daniel S.
Nathaniel Stoddard
Ranch Hand

Joined: May 29, 2003
Posts: 1258
I couldn't understand what you are asking, so here's a bit of thought on storing things in your session. How much information you need to store in your sessions depends on your web application. Coupled with how long you are anticipating sessions to last, and how much memory you have available, you need to decide for yourself what is acceptable.
To find out how much memory objects will take, analyze the data structure (for example an array of 1000 items of size 10 bytes = 10K of memory per session). Then multiply by the number of sessions, and so on.
Hope that helps.


Nathaniel Stodard<br />SCJP, SCJD, SCWCD, SCBCD, SCDJWS, ICAD, ICSD, ICED
Daniel Silva
Greenhorn

Joined: Nov 10, 2003
Posts: 9
There is a cache at my server of this session, using tomcat for example, without ejb??
Nathaniel Stoddard
Ranch Hand

Joined: May 29, 2003
Posts: 1258
Correct. The web container can persist your session information without EJB. All you have to do is setup your deployment descriptors correctly, and make sure that all your session data is serializable.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Session question
 
Similar Threads
Boggled by Eclipse - help!
How to order my DB results using servlets??
How can we deal if Users are exceeded to connection pool size
Strange Problem with Sessions
Out of memory due to vectors