Terminating a session and get a new id

Hello Forum,

at the moment I try to manage “user sessions” within a vaadin applicaton: User logs in, works, and then logs out.

After log out I clean the session and forward to the same page (sign on screen will be loaded as first content):

UI.getCurrent().getPage().setLocation(currentAppPage + "?restartApplication");

But I don´t get a new session id after terminating the session with close.

Is it possible to get a new session id?

I receive the id with:

VaadinSession vSession = UI.getCurrent().getSession();
WrappedSession wSession = vSession.getSession();
ssnid = wSession.getId();

I´m not sure if it is only a problem of the eclipse integrated apache tomcat server. Expecting the same behavior regarding sessions as in the stand alone server job. I´m right?


VaadinSession.close() only closes the VaadinSession instance stored in the underlying HttpSession or PortalSession. Use WrappedSession.invalidate() to close the underlying session as well. Oh, and you don’t need ?restartApplication.

how to use vaadin session in single page application for getting user login info untill logout