Sean, my question moves into the realm of cflock, so it might be OT, but
I'm wondering...
Shouldn't her/your code snippet instead be like:
<cflock scope="app" type="read">
<cfif isdefined("application.validateservice")>
<cfset defined="1">
<cfelse>
<cfset defined="0">
</cfif>
</>
<cfif not defined>
<cflock scope="app" type="excl">
...application.createobject...
</cflock>
</>
In the CF5 days, I got clarification from a CF engineer that the first
cflock was required even to do just a "lookup" on the application scope
for purposes of an isdefined(). Do you know of the status of this in
CFMX? I can't imagine that it's allowed now.
Thanks,
NAT
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Sean A Corfield
> Sent: Saturday, July 26, 2003 11:10 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [CFCDev] CFCs in memory
>
>
> This is not sufficient to avoid race conditions. You need the
> following
> construct:
>
> <cfif NOT IsDefined("Application.ValidateService")>
> <cflock scope="Application" Timeout="10" THROWONTIMEOUT="No"
> Type="Exclusive">
> <cfif NOT IsDefined("Application.ValidateService")>
> <cfobject component="#request.componentpath#ValidateService"
> name="Application.ValidateService">
> </cfif>
> </cflock>
> </cfif>
>
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev'
in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).