You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Mark Sandori <ms...@navigenics.com> on 2007/07/31 00:54:23 UTC

session timeout detection

Does anyone know how to detect a session timeout in Wicket 1.3 Beta 2?

Right now a new session is silently being created automatically after  
a timeout.

Thanks,
Mark. 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: session timeout detection

Posted by Johan Compagner <jc...@gmail.com>.
or

WebApplication
{
public void sessionDestroyed(String sessionId)
}

do call super!

johan


On 7/31/07, Martin Funk <fu...@arcor.de> wrote:
>
> Mark Sandori schrieb:
> > Does anyone know how to detect a session timeout in Wicket 1.3 Beta 2?
> >
> > Right now a new session is silently being created automatically after
> > a timeout.
> >
> > Thanks,
> > Mark.
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> not quite shure if I understand your or wicket correctly.
>
> How about (pseudocode):
>
> class YourNewSessionStore extends 'HttpSessionStore or
> SecondLevelCacheSessionStore' {
> protected void onUnbind(String sessionId)
>     {
>        //do whatever you want on the session timeout
>     }
> }
>
> then introduce YourNewSessionStore to YourApplication by:
>
> class YourApplication ..... {
>     protected ISessionStore newSessionStore()
>     {
>         return new MySessionStore(...);
>     }
> }
>
> see also:
> org.apache.wicket.WebApplication#newSessionStore()
> and:
> org.apache.wicket.protocol.http.AbstractHttpSessionStore#onUnbind(String)
>
> Martin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: session timeout detection

Posted by Martin Funk <fu...@arcor.de>.
erm... that's what coding outside the IDE does to you:-)
> class YourApplication ..... {
>    protected ISessionStore newSessionStore()
>    {
>        return new MySessionStore(...);
>    }
> }
I meant:
class YourApplication ..... {
   protected ISessionStore newSessionStore()
   {
       return new YourNewSessionStore(...);
   }
}

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: session timeout detection

Posted by Martin Funk <fu...@arcor.de>.
Mark Sandori schrieb:
> Does anyone know how to detect a session timeout in Wicket 1.3 Beta 2?
>
> Right now a new session is silently being created automatically after 
> a timeout.
>
> Thanks,
> Mark.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
not quite shure if I understand your or wicket correctly.

How about (pseudocode):

class YourNewSessionStore extends 'HttpSessionStore or 
SecondLevelCacheSessionStore' {
protected void onUnbind(String sessionId)
    {
       //do whatever you want on the session timeout
    }
}

then introduce YourNewSessionStore to YourApplication by:

class YourApplication ..... {
    protected ISessionStore newSessionStore()
    {
        return new MySessionStore(...);
    }
}

see also:
org.apache.wicket.WebApplication#newSessionStore()
and:
org.apache.wicket.protocol.http.AbstractHttpSessionStore#onUnbind(String)

Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org