Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

Please help me understand Vaadin session management

Nathaniel Waisbrot
1 decade ago Jan 02, 2012 11:55pm

Short version: How are sessions intended to be handled in a substantial web application?

Long version:

I'm new to web development, so I'm unfamiliar with some of the tools and terminology. I've been using Vaadin to prototype GUI applications and write little one-off demos at my office. I enjoy working in Vaadin, and I'd like to expand to using it for more applications of more substance and in production code. But every time I see that red "Session Expired" message pop up, I feel forced to re-think that idea.

Expiring sessions seems appropriate for applications that require a log-in to access sensitive information, but otherwise they are just an unpleasant experience for the end-user. I am troubled, though, because all the Vaadin demos I've seen include noisy session expiration alerts. For example, the Vaadin Sampler is handy when I'm doing development and want to see a widget in action. But I leave the window open while I write some code and when I return I have to have to go through the disruption of refreshing the whole page and then navigating back to where I'd been.

What I want is for end-users to never be affected by session expiration. It would be acceptable if sessions expired and re-initialized transparently; for example, if a user could click a widget in an expired session window and have it re-initialize the application, restore their previous session state, and then register the widget-click.

Is this possible, or am I just misunderstanding what Vaadin is useful for?

I am aware of the SmartSessions and Session Guard add-ons, but I'm concerned that if I need an add-on for what seems like a fundamental capability then I'm probably misusing the tool. (But maybe I'm wrong and I should treat this as just a weird oversight in development?)

I've seen other posts on this forum that appear to mirror my confusion, so perhaps this is something that could be added to the documentation.

Last updated on Jan, 2nd 2012
Charles Anthony
1 decade ago Jan 03, 2012 8:24am
Henri Sara
1 decade ago Jan 04, 2012 7:15am
dinesh muthu
10 years ago Oct 15, 2012 5:39am

" In Vaadin 7, there will probably be improvements to support similar functionality in Vaadin itself."

Kindly tell me what kind of functionality helpful for Session management in vaadin7.