I'm developing an vaadin web application and I added the following snippet of code in my web.xml.
<session-config>
<session-timeout>30</session-timeout>
</session-config>
Now i noted the also after 30 minutes my users are able to use the appllication and I don't want this. I read somethings about this problem on vaadin book, but I don't undestrand somethings.
From vaadin book:
Session Timeout After User Inactivity
In normal servlet operation, the session timeout defines the allowed time of inactivity after which the server should clean up the session. The inactivity is measured from the last server request. Different servlet containers use varying defaults for timeouts, such as 30 minutes for Apache Tomcat. You can set the timeout under with:
In a web.xml:
<session-config> <session-timeout>30</session-timeout> </session-config>
The session timeout should be longer than the heartbeat interval or otherwise sessions are closed before the heartbeat can keep them alive. As the session expiration leaves the UIs in a state where they assume that the session still exists, this would cause an Out Of Sync error notification in the browser.
However, having a shorter heartbeat interval than the session timeout, which is the normal case, prevents the sessions from expiring. If the closeIdleSessions parameter for the servlet is enabled (disabled by default), Vaadin closes the UIs and the session after the time specified in the session-timeout parameter expires after the last non-heartbeat request.
In a web.xml:
<servlet> ... <init-param> <param-name>closeIdleSessions</param-name> <param-value>true</param-value> </init-param>
Now I think the problem is that my application server leaves the UIs in a state where they assume that the session still exists but I'm not able to understand What is the heartbeat? and What the closeSessionId do precisely?