> Ok, what if you are using application variables as a part of the IF
> statement and session in the IF? e.g:
>
> <CFIF Application.Foo>
>
> <CFSET Session.bar = 1>
>
> </CFIF>
>
> Is it ok to nest different types of Locks (session and
> application).
Sure:
<cflock scope="application" type="readonly" timeout="2"
throwontimeout="true">
<cfif Application.Foo>
<cflock scope="session" type="exclusive" timeout="2"
throwontimeout="true">
<cfset Session.bar = 1>
</cflock>
</cfif>
</cflock>
> what if Application.foo was actually session.foo? Would I need
> nested session lock-ing or will the outer Lock around the if
> statement lock all session variables with in?
Then, you could lock the Session scope around the CFIF tag, and all accesses
to session variables between the CFLOCK tags would be locked. You'd want
that lock to be TYPE="EXCLUSIVE" if there will be any writes within the
lock.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.