• Post Reply Bookmark Topic Watch Topic
  • New Topic

tracking session memory

 
Arun Boraiah
Ranch Hand
Posts: 233
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am developing the servlet which puts few java bean on populating into session. I would like to know is there any api or any server utility which gives details of memory consumed by the data, which is put into the session by that servlet?
Thanks in advance.
-arun
 
Bosun Bello
Ranch Hand
Posts: 1511
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not aware of any method that will let you determine that.
 
Arun Boraiah
Ranch Hand
Posts: 233
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
even i don't know. That is the reason why i have posted.
 
raj sekhar
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may not be able to get the exact size of the data thru any api unless the web/appServer has some facility of looking into sessions(am not sure which web/appServer you are using) but if you are keen on knowing it, you may independently, check the size of the bean by creating a few hundred instances. Make sure that you call GC b4 and after you create the instances. Average it out with the difference in start and end free memory avaliable. This may give you a close approximation of their weight.
Thanks
RS
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!