-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi
I implemented Monitoring which displays server statistics and what worries me is that Number of Sessions and Number of Desktops is incremental. Seems that after actual timeout (set in web.xml) the ZK Session and Desktop won't get invalidated and that might cause some serious memory leaks. The spring bean associated with desktop get finalized just as it should when actual session gets timeout. To be sure I implemented DesktopCleapup listener which should be triggered in event of desktop destroy. It only gets triggered when I reload the desktop or navigate to some other page, and also in that case the Monitoring statistics change. So the Monitoring displays valid information after all. I also tried to set Session/Desktop timeouts in zk.xml, tried higher, equal and lower numbers compared to actual timeout, nothing happens, desktop still won't get destroyed. So the question remains why the Session and Desktop won't get invalidated after timeout's, or its just that the listeners wont be called?
I'm talking about active column. Active sessions number stays the same as total, same is with desktop, except when I reload the page or redirect to another page then desktop gets destroyed and Active Desktops -= 1. Normal sessions work perfectly, they get invalidated as they should be, also the .zul pages display session timeout message. Here is the ZK Monitoring and JavaMelody chart which displays sessions history.
Hi YberCyrus,
it will be done before close/refresh page with some delay,
a simple demo can be downloaded at
cleanup session and desktop demo
for session and desktop configuration or other ZK Configuration, please refer to following links
The session-config Element
The desktop-config Element
ZK Configuration Reference
Hi benbai,
I forgot to add org.zkoss.zk.ui.http.HttpSessionListener listener to web.xml, not sure if that is needed always but it's definitely needed when using Spring Security. After adding this everything gets cleaned up after session timeout.
PUSH!
code for 'cleanup session and desktop demo' is no longer available.Please give us a new storage address.
thanks
Thanks for your push and reminder, the new sample at github:
https://github.com/benbai123/ZK_Practice/tree/master/Flow/CleanupDesktopAndSession
Regards,
Ben
Asked: 2011-07-29 07:46:36 +0800
Seen: 943 times
Last updated: Dec 09 '12