What I do is:

<cflock scope="APPLICATION" type="READONLY" timeout="1">
        <cfif NOT IsDefined("Application.MyVariable")>
                <cfset Variables.doMyVariable = 1>
        </cfif>
</cflock>

<cfif IsDefined("doMyVariable")>
        <cfquery name="Variables.getStates" datasource=#dsn#>
                select States
                from StateTable
        </cfquery>
        <cflock scope="APPLICATION" type="EXCLUSIVE" timeout="5">
                <cfset Application.States = ValueList(Variables.getStates)>
        </cflock>
</cfif>


Basically you need to lock IsDefined's as well.

Ed
------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]

Reply via email to