I tried to use this Servlet in order to substitute heartbeat wich doesn’t seem to fire before session timeout when I close the browser.
However I doesn’t seem to work.
Did I miss something ?
Is it a correct use ?
Tks
Tullio
Hi! I’m not sure what you mean with substituting, heartbeat is for keeping the UI instance alive and should be used together with this add-on, it’s not an either-or situation. [This page]
(https://vaadin.com/docs/v8/framework/application/application-lifecycle.html) is a great resource for understanding how the whole session expiration and cleanup logic works. What this add-on does is to add a background thread for doing the existing cleanup check at regular intervals, not just at the end of each request. You can also find in the Links section a link to the GitHub sources, which include a small demo application that demonstrates configurations for an artificially quick session cleanup for easier testing.
The problem I found seems due to be the fact that non all UI expires when heartbeat fails 3 times but only “secondary”.
One UI is still alive until a session timeout.
I hoped Your add on would solve that issue but it seems I was wrong.
Tks
If you are using it like the example shows, this add-on does indeed solve that issue. Did you try out the demo application?
I tryed to introduce the solution in my environment (with alwaysCheckUITimeOuts true) and I get the following behavior : the session expires immediately, before I can do anything on it.
What’s wrong ?
Tks
Difficult to say without knowing your other configurations. If you followed the ones in the demo app, those are intentionally set artificially low for quick demonstration on how the feature works. Perhaps try to increase the heartbeatInterval?