Loading...
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
TUTORIAL

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

SessionGuard

Henrik Paul
1 decade ago Feb 05, 2010 12:22pm

To continue with the invisible widgets series, it's time for the SessionGuard.

The idea of this component is to handle the Vaadin sessions. The main function of this component is to announce to the application user, that her session is about to end, to give her a chance to react before the session invalidates. This component also makes sure that, when the session has ended, the Vaadin message will be presented proactively, and not when the user tries to do something.

The SessionGuard may also be used to keep the session artificially alive. Since this implementation is on the client side, the session never dies while the browser is open, but may die once the browser session is ended by the user. This allows for short session times in your web.xml, if you want that kind of thing.

The sources, along with a Vaadin add-on jar, may be found at http://github.com/wolfie/SessionGuard. An example on its usage is also available. That example runs at http://henrik.virtuallypreinstalled.com/SessionGuard, which you are welcome to give a go.

As usual, licensed under Apache 2.0

Last updated on Feb, 5th 2010
Royce Ausburn
1 decade ago Feb 08, 2010 11:45am
Dmitri Livotov
1 decade ago Feb 08, 2010 1:31pm
Henrik Paul
1 decade ago Feb 08, 2010 2:11pm
Dmitri Livotov
1 decade ago Feb 08, 2010 2:41pm
Henrik Paul
1 decade ago Feb 09, 2010 6:56am
David Wall
1 decade ago Feb 09, 2010 4:52pm
Dmitri Livotov
1 decade ago Feb 09, 2010 4:55pm
Joonas Lehtinen
1 decade ago Feb 09, 2010 5:12pm
Royce Ausburn
1 decade ago Feb 09, 2010 9:27pm

I wonder. Could this component be modified to act as a sort of screen saver? I'd like to give my application a short timeout and hold the session open using SessionGuard. But it'd be neat if after, say, 10 mins of inactivity I could prompt the user for their password while holding the session open.

I guess this change is a little deeper, though. I'd need to deal with the case where the user just hits refresh and I don't know how I'd do that just yet.

Henrik Paul
1 decade ago Feb 10, 2010 6:21am
Joonas Lehtinen
1 decade ago Feb 10, 2010 7:13am
Mourid SMIDA
1 decade ago Feb 24, 2010 5:31pm
Henrik Paul
1 decade ago Feb 25, 2010 6:11am
Ramzi Youssef
1 decade ago Feb 25, 2010 8:19am
Henrik Paul
1 decade ago Feb 25, 2010 8:29am
Ramzi Youssef
1 decade ago Feb 25, 2010 9:53am
Henrik Paul
1 decade ago Feb 25, 2010 10:10am

Ramzi Youssef: By the way what are the future plans for SessionGuard plug-in ?

I think once I get around implementing a maximum keepalive period in a sensible way, I think I'll call it 1.0.0, stable and done. There's not much you can do with the session without going out of bounds of the component's responsibilities. Besides, as mentioned earlier, these features are being planned to be an integral part of Vaadin. There's not much use to plan a an extensive future, apart from the occasional bug fix, for this component.

Thorsten A
1 decade ago Mar 03, 2010 7:37am
Henrik Paul
1 decade ago Mar 03, 2010 7:55am
Thorsten A
1 decade ago Mar 03, 2010 9:27am
Boot Laces
1 decade ago Apr 23, 2010 6:41pm
Henrik Paul
1 decade ago Apr 26, 2010 7:47am
Federico Hernandez
1 decade ago Aug 17, 2010 11:28pm
Henrik Paul
1 decade ago Aug 18, 2010 7:49am
Federico Hernandez
1 decade ago Aug 25, 2010 3:40pm
Federico Hernandez
1 decade ago Aug 25, 2010 5:25pm
Pierre Le Roux
1 decade ago Mar 11, 2011 11:46am
Henrik Paul
1 decade ago Mar 11, 2011 12:43pm
Pierre Le Roux
1 decade ago Mar 11, 2011 1:27pm
John Rizzo
1 decade ago Mar 29, 2011 11:52am
Henrik Paul
1 decade ago Mar 29, 2011 12:00pm
John Rizzo
1 decade ago Apr 14, 2011 12:22pm
Henrik Paul
1 decade ago Apr 14, 2011 12:32pm
Henrik Paul
1 decade ago Apr 15, 2011 11:42am
John Rizzo
1 decade ago Apr 19, 2011 11:24am
Henrik Paul
1 decade ago Apr 19, 2011 11:29am
John Rizzo
1 decade ago Apr 19, 2011 12:49pm
Henrik Paul
1 decade ago Apr 20, 2011 5:05am
Jan Hink
10 years ago Oct 21, 2011 11:28am