• 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: Get Sessions from Application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Get Sessions from Application


  • Subject: Re: Get Sessions from Application
  • From: "Daniele Corti" <email@hidden>
  • Date: Wed, 5 Sep 2007 15:05:13 +0200



2007/9/5, Mike Schrag <email@hidden>:
Assuming you're not using a servlet deployment:

      WOServerSessionStore sessionStore = (WOServerSessionStore) WOApplication.application().sessionStore();
      NSArray sessions = sessionStore._sessions().allValues();

Thanks that's what I need!

Note that this will only return the sessions that exist within a single instance.  If you are running multiple instances, you would need to check each instance.  Also, SessionStore does not expose the last access time as public -- we add that to our base session subclass and touch the value in session.awake() so you can tell if the sessions are recently used. 

I don't think I will need a too accurated value, I only need to know if a variable in the Session is setted: I mean, I use an Enterprise Object GWSUser to memorize witch user is logged in in each session, so I only need to know if it there are users logged in and how many they are
 

I don't recall if Session has a method that tells you if its currently checked out or not, either, but you can also add a boolean check to at least see if the session is currently awake or not.

ms

On Sep 5, 2007, at 4:10 AM, Daniele Corti wrote:

Hi all,
   I've a problem with my last app:
   We use our app as a WebService that provide license for our products and donwload upgrades, and a Web Site for Support.
   It has happen (today) that we make some changes, so shutdown the app, while someone was downloading an update.

   You can easly image that our customer wasn't happy about this....

   I was thinking to prepare a method in Application for searching in active session if someone is logged in, and display it in the admin panel, but I wasn't able to find out how to access to the sessions.
   Is there a way to do this, or not?

   I will thank you for every advices!!!!

--
Daniele Corti
AIM: S0CR4TE5
Messenger: email@hidden

--
Computers are like air conditioners -- they stop working properly if you open
WINDOWS

--
What about the four lusers of the apocalypse? I nominate:
"advertising", "can't log in", "power switch" and "what backup?"
--Alistair Young
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
email@hidden



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (



--
Daniele Corti
AIM: S0CR4TE5
Messenger: email@hidden

--
Computers are like air conditioners -- they stop working properly if you open
WINDOWS

--
What about the four lusers of the apocalypse? I nominate:
"advertising", "can't log in", "power switch" and "what backup?"
--Alistair Young
 _______________________________________________
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

  • Follow-Ups:
    • Re: Get Sessions from Application
      • From: Guido Neitzer <email@hidden>
    • Re: Get Sessions from Application
      • From: Mike Schrag <email@hidden>
References: 
 >Get Sessions from Application (From: "Daniele Corti" <email@hidden>)
 >Re: Get Sessions from Application (From: Mike Schrag <email@hidden>)

  • Prev by Date: Re: Get Sessions from Application
  • Next by Date: Re: Get Sessions from Application
  • Previous by thread: Re: Get Sessions from Application
  • Next by thread: Re: Get Sessions from Application
  • Index(es):
    • Date
    • Thread