Thanks Martin,
I could not find onDetach() but found detach() so I have done this in my
WebSession subclass:
@Override
public void detach()
{
long loSize = getSizeInBytes();
m_logger.log(Level.FINE, String.format("Session size = %,dB.", loSize));
super.detach();
}
This seems to be fine (my sessions seem very small at ~1.7kB - I must be
doing something wrong) except that this method can be called several times
as a result of one request.
Thanks again,
Ian
Martin Grigorov-4 wrote
>
> Override Session#onDetach() and do it before calling super.onDetach().
>
> On Fri, Jul 13, 2012 at 2:01 PM, Ian Marshall <IanMarshall.UK@>
> wrote:
>> Hello,
>>
>> Is there a good way to discover my serialised or about-to-be-serialised
>> session size without adding the debug bar to my page?
>>
>> I currently use
>>
>> @Override
>> protected void onAfterRender()
>> {
>> super.onAfterRender();
>>
>> CloudSession ssnSession = (CloudSession)getSession();
>> long loSize = ssnSession.getSizeInBytes();
>> m_logger.log(Level.FINE, String.format("Session size = %,dB.",
>> loSize));
>> }
>>
>> in my WebPage subclass, but I suspect that this is the wrong place to
>> examine the session size.
>>
>> My software environment is:
>>
>> Web framework: Wicket 1.5.7
>> Web server system: Google App Engine for Java version 1.7.0
>> Java: 1.6.0_33; Java HotSpot(TM) Client VM 20.8-b03
>> Operating system: Microsoft Windows XP Home Edition version 2002 SP3
>> (version 5.1 running on x86; Cp1252; en_GB)
>>
>>
>> Ian Marshall
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Determine-session-size-for-Wicket-1-5-tp4650050p4650513.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]