• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Getting all Session Objects From Application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Getting all Session Objects From Application (From: Owen McKerrow <email@hidden>)

  • Prev by Date: Re: Getting all Session Objects From Application
  • Next by Date: Re: indexing non-sorted arrays in EOs
  • Previous by thread: Re: Getting all Session Objects From Application
  • Next by thread: Web Service fails: add is not a supported operation in com.webobjects.foundation.NSArray ?
  • Index(es):
    • Date
    • Thread