• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Session question

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Daniel Silva
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is a cache at my server of this session, using tomcat for example, without ejb??
 
Nathaniel Stoddard
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
They weren't very bright, but they were very, very big. Ad contrast:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic