Hi guys,

I'm trying to count the number of sessions, and I'm getting crazy with this.

I have the following code on my onApplicationStart:

<cflock name='numSessionsLk' timeout='15' type='exclusive'>
    <cfset Application.numSessions = 0>
</cflock>
then I have this on my OnSessionStart:

<cflock name='numSessionsLk' timeout='15' type='exclusive'>
    <cfset Application.numSessions = Application.numSessions + 1>
</cflock>

and finally I have this on my onSessionEnd:

<!--- AppScope being my second arguments passed --->
<cflock name='numSessionsLk' timeout='15' type='exclusive'>
    <cfset AppScope.numSessions = AppScope.numSessions + 1>
</cflock>

The onSessionEnd is executed twice. SO if I have numSessions = 4, if one 
sessions expires, instead I have 3, I will have 2. :(. I place a cflog, and 
logs twice. There are not cflocks nested on anything like it.

I hope you guys can help me....

Thank you....

JC

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 & 
Flex 2
Free Trial 
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:275926
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to