I just ran this on my local machine, which nobody else can see and it's
convinced that there are 5 sessions. Odd-that. I dumped all of the data
out and there are 5 nearly identical sessions. Now I'm going to wait
until tomorrow AM when there's been no activity on the machine all night
long and I'll run that page first thing to see what it says. Very
interesting...
--Ferg
Dave Carabetta wrote:
> On 2/8/06, Russ <[EMAIL PROTECTED]> wrote:
>
>> What about purging all sessions, not just the current session.... or at
>> least getting a count of sessions somehow... Is that even possible?
>>
>>
>
> As an intended feature? No. And that's something I know Adobe has
> mentioned Scorpio (CF 8) will hopefully address. However, I think it
> was Ray Camden who posted this code a long time ago that I've kept
> around for getting the number of sessions on MX 6.1. I've not tried it
> on MX 7 yet, so YMMV. It involves getting under the hood of
> ColdFusion's runtime:
>
> function getSessions(appName) {
> var tracker = createObject("java", "coldfusion.runtime.SessionTracker");
> return tracker.getSessionCollection(appName);
> }
>
> variables.numSessions = 0;
> variables.sessions = getSessions(application.applicationName);
> variables.numSessions = structCount(variables.sessions);
>
> <cfoutput>Total Number of Sessions: #variables.numSessions#</cfoutput>
>
> Hope this helps?
>
> Regards,
> Dave.
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:231667
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54