That's an interesting question... looking at the code I wrote in Java
Web Parts for the getSessionSize() method, I'm only taking into
consideration the fields of the objects in session. I think this is OK
because IIRC, when an object is serialized, only the non-transient
values are considered. The methods don't factor into it because you
aren't serializing the class definition, just the state of the object.
If anyone knows differently I'd like to hear about it, but I believe how
that method works yields an accurate result.
If you want to see how I've done it, check out:
http://javawebparts.sourceforge.net
If you look at the javadocs, in the session package, there is a class
called SessionSize that is used to get the size of a session object.
You can grab the code and see how it's done, or just use it if that's
your ultimate goal :)
Frank
Robert Palmer wrote:
When calculating the size of a session bean to determine memory usage,
what should be included and how is this done? Do the number of methods
matter? The size of the code? Just the variables? I've read much about
limiting the size of the session information but not how to do it. I
have some fairly large classes in session context but they don't store
very much.
Thanks.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]