Re: Getting all Session Objects From Application
Re: Getting all Session Objects From Application
- Subject: Re: Getting all Session Objects From Application
- From: Guido Neitzer <email@hidden>
- Date: Wed, 23 Apr 2008 22:27:22 -0600
On 23.04.2008, at 22:15, Owen McKerrow wrote:
I have an app that needs to display all of the people who are
currently logged in. Session has an instance of Person in it, which
represents who's logged into that session.
I do something similar but I keep track of all the logged in users
(active sessions) in the database as I have a couple of instances
running.
In sleep of Session I write the currently logged in user to the
database with its last action (which page he is on, timestamp, session
id, ip, and some more stuff), if a record for the session id exists, I
only update that one.
Now you can either remove the entry for a specific session from the
database in terminate or mark them as "terminated". You should also
have some cleanup code on application startup that removes all entries
for the instance or marks them as "terminated".
Works really good here.
cug
--
http://www.event-s.net
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden