If you just want the size of a given session, take a look at Java Web Parts:

http://javawebparts.sourceforge.net

Specifically, the SessionSize class:

http://javawebparts.sourceforge.net/javadocs/javawebparts/session/SessionSize.html

If your looking for the footprint of your entire application, I'm afraid I
have no good answer for that.

HTH,
Frank

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!

On Fri, June 23, 2006 11:26 am, Monkeyden wrote:
> This is particularly difficult in Java, since there is no reliable and
> invariable way to measure the size of an object.  Interestingly, while
> trying to avoid work the other day, I stumbled onto this write up on the
> topic.  Martin Roth asserts that the only way to do it in Java is to get
> the
> current memory footprint of the runtime before the object (HttpSession) is
> created and the footprint after the last object reference (e.g. a session
> attribute) is added to it.  The difference between these two values ~
> yields
> to size of the object.  This is, as you might guess, very unreliable,
> since
> the operands for the measurement are at application scope and it's not the
> only thing happening within the application.  Also note that this measures
> only the size of the HttpSession instance and the object references it
> holds.  It does not measure the physical size of the objects which are
> referenced by the session.
>
> http://martin.nobilitas.com/java/sizeof.html
>
>
> On 6/23/06, starki78 <[EMAIL PROTECTED]> wrote:
>>
>> Well I can remember having used session-size
>> tags that worked fine,
>> but after a while I came to the conclusion
>> that this is not so important.
>> http://www.servletsuite.com/servlets/ssizetag.htm
>>
>> Nice greetings
>> Starky
>>
>> ---------- Initial Header -----------
>>
>> From      : "Carl Smith" [EMAIL PROTECTED]
>> To          : "Struts Users Mailing List" user@struts.apache.org
>> Cc          :
>> Date      : Thu, 22 Jun 2006 07:48:58 -0700 (PDT)
>> Subject : To get the session size
>>
>>
>>
>>
>>
>>
>>
>> > I am trying to get the session size of our J2EE  Struts based, and
>> runing in WebSphere environment, application. Can some one point me what
>> is
>> the good way to get the session size? What tool is a good tool for
>> using?
>> WSAD Profiling?
>> >
>> >
>> > ---------------------------------
>> > Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+
>> countries) for 2ยข/min or less.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to