On 03/12/10 05:39 AM, webtier_at_javadesktop.org wrote:
> Hi Everyone, i try to get HttpSessions from ServletContext(ApplicationContext)...Because i think this is the only way to learn if the user's session is time-out or not...i read an article about LRUCache of servlet engine but could not find any information how to reference it...How can i listen a specific user's session? do i have to use a java.util.Map to store sessionIds of Users and a thread to expire them after a period of time equals to the session time-out parameter in web.xml?...
> I am using Glassfish v2.1...
> Thx for your replies in advance...
>
You don't need to worry about determining whether user sessions have
timed out and should be invalidated and purged. The web container takes
care of this. It assigns a container thread to every deployed web
application, which periodically (using a configurable time interval)
enumerates all of the application's active sessions and determines which
ones have exceeded their maxInactiveInterval and therefore should be
removed.
Jan
> [Message sent by forum member 'ilitheblack' (gurcan.ilker_at_hotmail.com)]
>
> http://forums.java.net/jive/thread.jspa?messageID=391481
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: webtier-help_at_glassfish.dev.java.net
>
>