the application scope. This allows you to do a LOT of stuff with the
"logged in" users but forces you to manage session timeouts on your own:
however the big win is that you can decide what to do on session timeout
(I store all the pages visited, resolution information, duration, etc in
a home-grown metrics application). I use a scheduled task to
periodically timeout old sessions.
It's a bit of work to set up, but you gain complete control. In CF
5/4.5 you must understand locking pretty well however or else you'll be
dealing with performance and stability issues. However with good
locking and an eye towards performance I've never had a performance or
stability problem with this code. It's used on at least one
high-traffic site as well.
Jim Davis
-----Original Message-----
From: brob [mailto:[EMAIL PROTECTED]
Sent: Friday, November 07, 2003 4:07 PM
To: CF-Talk
Subject: Re: How to count sessions
is there an equivalent for CF 5? :)
thanks!
----- Original Message -----
From: [EMAIL PROTECTED]
To: CF-Talk
Sent: Friday, November 07, 2003 2:58 PM
Subject: RE: How to count sessions
actually there is...one way in CFMX is this quick stuff
<cfapplication name="sessionLister" sessionManagement="yes">
<cfset tracker = createObject("java",
"coldfusion.runtime.SessionTracker")>
<cfset sessions = tracker.getSessionCollection("myappname")>
<cfdump var="#sessions#">
Ray Camden has some other code for this...a flash app even...out on
his blog under http://www.camdenfamily.com/morpheus/blog/
Doug
-----Original Message-----
From: brob [mailto:[EMAIL PROTECTED]
Sent: Friday, November 07, 2003 3:56 PM
To: CF-Talk
Subject: Re: How to count sessions
I dont think there's a server variable that counts the number of
unique sessions available. You can find out this way though....First yo
have an application variable like application.counter, and then
everytime a member logs in you increment that counter by 1.
Be sure to check for things like if they are already logged in and are
just signing in again, to not increment the counter. You can also avoid
this problem by writing code on the login page to forward them to their
member page if their logging session variable is TRUE. That way they
dont have to put in their username/password twice
----- Original Message -----
From: Eric Creese
To: CF-Talk
Sent: Friday, November 07, 2003 2:22 PM
Subject: How to count sessions
How can you count the number of active session are opened. For
instance I have a membership site and I want to get a count of members
who have logged in and have an open session.
E
_____
_____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

