Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
How to catch timeout event when session elapses
In my app i set up the max. session duration using "VaadinSession.getCurrent().getSession().setMaxInactiveInterval". When time is up i receive event in my "HttpSessionListener.sessionDestroyed". Everything is quite common here, nothing special. The problem is that i'm saving some important information in "VaadinSession" object which is destroyed right before i receive a call to "HttpSessionListener.sessionDestroyed". So how can i catch this destroying signal and process my saved object in the needed way?
P.S. I work on some legacy project, so "rewrite everything" solution is not applicable unfortunately..
Thanks in advance for your assist.
have you tried creating your own Servlet that extends VaadinServlet and implements SessionDestroyListener? I think that should still have the information intact.
Hi! Thanks for the reply.
Actually i have already the VaadinServlet-based servlet - it is my application. Do you mean i need another one to track sessions or some other information?
No, you can use the same one, just implement SessionDestroyListener.
Olli Tietäväinen: No, you can use the same one, just implement SessionDestroyListener.
Thanks a lot! Actually your suggersion solved the issue)
Great, you're welcome!