Maybe bind sessionId with user ID when session is created? on a persistence
storage? So that you can recover user ID with the session Id


On Sat, Nov 16, 2013 at 12:19 PM, Dirk Wichmann <dir...@team-wichmann.de>wrote:

> Thanks, that works, but how can I get my WebSession Object??
> In there the user is stored and I need the id of the user.
> WebSession.get() does not work
>
> Thanks in advance
> Dirk
>
>
> Am 16.11.2013 11:04, schrieb Francois Meillet:
> > You can write a unboundListener and register it in your sessionStore.
> > This code should be in your application init()
> >
> > getSessionStore().registerUnboundListener( new
> ISessionStore.UnboundListener() {
> >       @Override
> >       public void sessionUnbound(String sessionId) {
> >               // logout timestamp in the database
> >       }
> > });
> >
> >
> > François Meillet
> > Formation Wicket - Développement Wicket
> >
> >
> >
> >
> >
> > Le 15 nov. 2013 à 23:19, Dirk Wichmann <dir...@team-wichmann.de> a
> écrit :
> >
> >> Hi all,
> >>
> >> it's quite frustrating, a simple thing gets complicated.
> >> I have a Webapp with login page and logout button.
> >> If the user clicks the logout I write a logout timestamp in the
> database.
> >> Now I want to write the same timestamp when the session expires.
> >> Only thing I have found on the Web is to use
> >> WebApplication.sessionUnbound with Session ID.
> >> When this method is called the AuthenticatedWebSession is still dead I
> >> think or maybe I cant get the Object.
> >> Other thing I found is the method onInvalidate() in the webSession, but
> >> this method is never called. (i'm on Wicket 6.1.)
> >>
> >> What is the right way to do the trick??
> >>
> >> Thanks in advance
> >> Dirk
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Regards - Ernesto Reinaldo Barreiro

Reply via email to