And, if you are ok with configuring that extra line in web.xml, you
can add HttpSessionListener.

public interface HttpSessionListener extends EventListener {
    /**
     * Notification that a session was created.
     * @param se the notification event
     */
    public void sessionCreated(HttpSessionEvent se);

    /**
     * Notification that a session is about to be invalidated.
     * @param se the notification event
     */
    public void sessionDestroyed(HttpSessionEvent se);
}


Eelco

On 9/25/06, Johan Compagner <[EMAIL PROTECTED]> wrote:
> If you just want an event on session destroyed and the sessionid is good
> enough info for you
> you could use the method WebApplication.sessionDestroyed(String sessionid)
> Do not forget to call super.sessionDestroyed(string) then
>
> johan
>
>
> On 9/25/06, Tymur Porkuyan <[EMAIL PROTECTED]> wrote:
> > Is there a way to call some method each time a session expires or is
> > invalidated?
> >
> > I need to implement a cache for non-serializable objects. This cache
> > must be separate for different users and objects must stay in this
> > cache until the user logs out or session expires.
> >
> > I store these objects in a cache linked to the application object and
> > keep numeric references to them in session. When session expires, I
> > need some way to remove objects that were referenced by that session
> > from the cache.
> >
> >
> -------------------------------------------------------------------------
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> > opinions on IT & business topics through brief surveys -- and earn cash
> >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > _______________________________________________
> > Wicket-user mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
>

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to