Actually, that using NAME is not a better practice... the SCOPE attribute is
safer and is also what MM support advised us to use (when applicable).
Sure, the scope of a NAME-based lock will be tighter than using SCOPE, but
SCOPE will be safer and, as a bonus, you can use CF 5's (and prior)
auto-checking for missing locks... that doesn't work if you use the NAME
version to try to protect the session, application, etc scopes. (Note: I
only use the auto-checking on a development machine.)
Basically, "NAME" is older than "SCOPE", and SCOPE was added to address
issues that NAME cannot handle. NAME still has a place though, since there
are other kinds of locking you may need to do that SCOPE is inappropriate
for.
Mark
-----Original Message-----
From: Sean A Corfield [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 04, 2002 2:46 PM
To: CF-Talk
Subject: Re: Variable locking
On Friday, Oct 4, 2002, at 11:37 US/Pacific, Paul Giesenhagen wrote:
> Yup (on CF5, good practice on CFMX but not required)
>
> <cflock timeout="20" throwontimeout="No" type="READONLY"
> scope="SESSION">
> <cfoutput>#session.fullname#</cfoutput>
> </cflock>
Better practice:
<cflock timeout="20" throwontimeout="No" type="READONLY"
name="session_fullname">
<cfoutput>#session.fullname#</cfoutput>
</cflock>
Using a named lock instead of a scoped lock.
An Architect's View -- http://www.corfield.org/blog/
Macromedia DevCon 2002, October 27-30, Orlando, Florida
Architecting a New Internet Experience
Register today at http://www.macromedia.com/go/devcon2002
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community. http://www.fusionauthority.com/ads.cfm