closeIdleSessions not working

Hello Everyone!
I have an application built with Vaadin 7.4.5, and it seems that Servlet init-param “closeIdleSessions” is not working:

<init-param> <param-name>closeIdleSessions</param-name> <param-value>true</param-value> </init-param> Heart-beat interval is the default one, and I have configured Http Session time-out in 60 seconds (one minute). Then I start the application, and login, wait one minute with browser’s tab open, but nothing happens, any idea of what could be going on?
Thanks in advance!

Hi, the heartbeat interval is probably longer than your session timeout, and that’s causing the issue.
This blog post is also a good introduction to the various considerations:
https://vaadin.com/blog/-/blogs/filter-based-spring-security-in-vaadin-applications

This stuff is a bit tricky…

Hi! thanks for your response Tom!
I’ve tried adding the parameter in web.xml for setting HeartBeat interval in 30 seconds. Session time out is set in 60 seconds. But still the problem remains. After login in my application, I wait 60 seconds but nothing happens.
Here is my configuration:

[code]

<?xml version="1.0" encoding="UTF-8"?>




heartbeatInterval
30

<servlet>
    <servlet-name>Vaadin-Application-Servlet</servlet-name>
    <servlet-class>com.vaadin.spring.server.SpringVaadinServlet</servlet-class>



closeIdleSessions
true





60



[/code]What I see in my browser is that a request to the server is made continuously (see attached image).
It seems that for some reason, HeartBeat interval is being ignored?
Thanks in advance!!

26604.png

Hi,

session-timeout in web.xml is specified in minutes, not seconds, so you’d have to specify 1 not 60 I think.

Yes you’re right!, I’ve changed it, but strangely, I have the same situation. I wait but nothing happens :frowning:

[code]

<?xml version="1.0" encoding="UTF-8"?>




heartbeatInterval
30



Vaadin-Application-Servlet
com.vaadin.spring.server.SpringVaadinServlet


closeIdleSessions
true





1



[/code]Thanks for your help! … I will continue investigating …