Maybe you can write a session listener to intercept session
destruction (give a look at servlet api, in particular
HttpSessionListener). For sessions that do have an associated (logged
in) user you can set the isConnected flag to false then.

I wouldn't recommend keeping these flags in a persistent store anyway.
A session manager that keeps an in-memory transient set of logged in
users feels better to me. The users themselves need not to be kept all
the time in memory, of course, that would swallow up resources. This
way, if your application hangs up your currently logged in users state
will disappear together with your sessions.

Regards,
Carlos

On 9/11/07, landry soules <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I have to display a list of the connected users in a page of my app. I
> know it sounds definitely dumb, but i don't know how to achieve this...
> Users login to my site (i extended AuthenticatedWebApplication), and
> then i update a "isConnected" flag in users table.
> Thus i display the connected users in a list view, retrieved by the
> "isConnected" flag.
> It implies of course that users will use a "logoff" button when they
> leave, which i don't believe they will do...
> I'm aware it's not a Wicket related problem, but a more generally web
> apps problem, but what is the best solution to deal with this ?
> Thanks for your answers.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to