This is the one!
Thanks Chris.
Benoit Hediard
www.benorama.com
www.affinitiz.com
-----Message d'origine-----
De : chris kief [mailto:[EMAIL PROTECTED]
Envoyé : samedi 22 novembre 2003 18:51
À : CF-Talk
Objet : RE: SessionTracker and session expiration
Sam Neff talks about the reflection technique here:
http://www.rewindlife.com/archives/000069.cfm
chris
_____
From: Benoit Hediard [mailto:[EMAIL PROTECTED]
Sent: Saturday, November 22, 2003 2:01 AM
To: CF-Talk
Subject: SessionTracker and session expiration
Hi everyone,
Looking for an article on CFMX SessionTracker.
We have put in place a session tracker to count the number of sessions on
our application.
<cfset tracker = createObject("java","coldfusion.runtime.SessionTracker")>
<cfset sessions = tracker.getSessionCollection("MyApp")>
<cfset sessionsNb = structCount(sessions)>
This is working fine.
But we have recently replace the last line by :
<cfset sessionsNb = 0>
<cfloop collection="#sessions#" item="ID">
<cfif structKeyExists(sessions[ID],"member")>
<cfset sessionsNb = sessionsNb + 1>
</cfif>
</cfloop>
An advice, don't do this kind of manipulation on a regular basis (for
example with a scheduled task), because it creates a huge memory leak :
sessions will never expire!
It is probably because you "touch" the session content, so it changes the
timestamp of all the sessions...
I'm pretty sure I've read an article concerning this issue on a CF blog
somewhere.
If I remember well, the author was showing how to use java reflection to
workaround it.
Can't find it in the archives of CF blogs or even in google.
Anyone remember this?
Benoit Hediard
www.benorama.com
www.affinitiz.com
_____
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
- SessionTracker and session expiration Benoit Hediard
- Re: SessionTracker and session expiration Larry C. Lyons
- RE: SessionTracker and session expiration chris kief
- Benoit Hediard