0

ZK Session/Desktop won't get invalidated after actual session timeout.

asked 2011-07-29 07:46:36 +0800

YberCyrus gravatar image YberCyrus
30

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?

delete flag offensive retag edit

7 Replies

Sort by ยป oldest newest

answered 2011-07-29 10:03:16 +0800

zippy gravatar image zippy
504 1 2

The column total is historical

link publish delete flag offensive edit

answered 2011-07-29 11:02:53 +0800

YberCyrus gravatar image YberCyrus
30

updated 2011-07-29 11:09:11 +0800

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.

link publish delete flag offensive edit

answered 2011-07-29 12:56:31 +0800

benbai gravatar image benbai
2228 6
http://www.zkoss.org

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

link publish delete flag offensive edit

answered 2011-07-29 13:25:24 +0800

YberCyrus gravatar image YberCyrus
30

updated 2011-07-29 15:35:35 +0800

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.

link publish delete flag offensive edit

answered 2012-12-08 22:35:28 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

PUSH!

code for 'cleanup session and desktop demo' is no longer available.Please give us a new storage address.

thanks

link publish delete flag offensive edit

answered 2012-12-09 07:36:03 +0800

benbai gravatar image benbai
2228 6
http://www.zkoss.org

Thanks for your push and reminder, the new sample at github:
https://github.com/benbai123/ZK_Practice/tree/master/Flow/CleanupDesktopAndSession

Regards,
Ben

link publish delete flag offensive edit

answered 2012-12-09 10:21:32 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

many thanks Ben.

please, can you have a look on this thread to help csandeep.

thanks
Stephan

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2011-07-29 07:46:36 +0800

Seen: 943 times

Last updated: Dec 09 '12

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More