[thelist] CFLOCK help request
Susan Wallace
susanhw at webcastle.com
Thu Jun 6 22:31:01 CDT 2002
Greetings!
I inherited a CF application that was customized for one site, and is being
moved to a new server. The application was written using CFLOCK in this manner:
<CFLOCK name="Session.UserID" timeout="10">
The server this was moved to throws an error (I'll outline in a sec) and
when I inquired about the server settings for Locking, the reply I got was
"The server is set for full locking."....
So, in the way of troubleshooting I loaded the main page, got the error:
***
An error has occurred while processing the expression:
Session.UserID=CFTempOnlyForSetVariableNeverUseThisNameInYourCFMLCode122333444455555654321
Symbol Session.UserID is in a scope that contains data shared across
threads and cannot be accessed without an active lock
***
And changed that particular lock to this:
<CFLOCK timeout="10" scope="session">
I got past that page, loaded the next one, got the same error, different
page, same locking syntax. Changed that lock.
Then, the next error I got was basically the same, but this time, the code
looks like this:
(Error is on :#Session.CalendarID# NEQ #Attributes.CalendarID#)
***
<CFIF IsDefined("Session.CalendarID")>
<CFIF #Session.CalendarID# NEQ #Attributes.CalendarID#>
<CFLOCK name="Session.CalendarID" timeout="10">
<CFSET Session.CalendarID = #Attributes.CalendarID#>
</CFLOCK>
<CFSET Client.OptionsSet = "no">
<CFINCLUDE template="/calendar/common/act_options.cfm">
</CFIF>
</CFIF>
***
If I change the Lock inside the second CFIF, I get "Extraneous CFIF" tag. I
have tried various combinations, but I seem to have a nesting issue that I
don't grok.
I am about brain fried, but I have been through the manual and the Best
Practices, but there is something I missed here.
Can someone point me in the right direction, please?
Thanks for any suggestions!
Susan Wallace
More information about the thelist
mailing list