Does cf also lock all variable references of the complex variables of the
application scope's variables?

For example: 

Template1.cfm:

<cflock scope="application" timeout="20" type="exclusive">
        <cfset application.properties.dsn = "dsn" />
        <cfset application.properties.locales =structNew() />
</cflock>

Template2.cfm:
Line1: <cfset variables.properties = application.properties />
Line2: <cfquery datasource="#variables.properties.dsn#">
Line3:  ....
Line4: </cfquery>
Line5: <cfif structKeyExists(variables.properties.locales, url.loc)>
Line6:    <cfset setLocale(variables.properties.locales[url.loc] />
Line7: </cfif>

Template3.cfm:
<cflock scope="application" timeout="20" type="exclusive">
        <cfset application.properties.dsn = "anotherdsn" />
        <cfset application.properties.locales["en_US"] = "English (US)" />
        <cfset application.properties.locales["en_UK"] = "English (UK)" />
</cflock>

Does Cf wait the application lock when using variables.properties in
template2.cfm?
Murat.

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Barney Boisvert
> Sent: Tuesday, November 09, 2004 8:32 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [CFCDev] Thread-safety
> 
> Yeah, locks are always server wide.  So if you lock a given
> application, it locks it on every request to that application across
> the server.  If you're clustered, it won't go between machines, of
> course.
> 
> cheers,
> barneyb
> 
> On Tue, 9 Nov 2004 20:14:58 +0200, Murat Demirci 
> <[EMAIL PROTECTED]> wrote:
> > Does exclusive cflockings of the application scope prevent 
> to access the scope from *everywhere*?
> > 
> 
> -- 
> Barney Boisvert
> [EMAIL PROTECTED]
> 360.319.6145
> http://www.barneyb.com/blog/
> 
> I currently have 0 GMail invites for the taking
> ----------------------------------------------------------
> You are subscribed to cfcdev. To unsubscribe, send an email
> to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' 
> in the message of the email.
> 
> CFCDev is run by CFCZone (www.cfczone.org) and supported
> by Mindtool, Corporation (www.mindtool.com).
> 
> An archive of the CFCDev list is available at 
> [EMAIL PROTECTED]
> 


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at 
[EMAIL PROTECTED]

Reply via email to