> When using cflock to read/write session or application
> variables using CF Server 4.5 should I use the Name attribute
> or the Scope attribute?
>
> If I use Name will I still be able to set the different
> characteristics of the locking schema in CF Administrator....
> will they still work or do I need to use Scope for this?
Under CF 4.5.x, you'll want to use the SCOPE attribute when locking memory
variables. It's a bit hard to use the NAME attribute to do this efficiently,
which is why they introduced the SCOPE attribute.
For best performance, you should handle all your locks yourself, rather than
using CF Server to do it for you. If you do mix CFLOCK tags with CF Server's
full checking of locks, you'll have to use the NAME attribute. Here's what
it says in the CF Administrator about this:
"Full checking: ColdFusion automatically checks all shared variable scope
access to ensure that it is properly locked. If a variable is not properly
locked, an error will be thrown. Note this form of lock checking should be
applied only to applications that use the SCOPE attribute of the CFLOCK tag
to specify locks, not the NAME attribute. If you have specified the NAME
attribute, ColdFusion will throw an error on any variable accessed within
the locked block if full checking is applied on the scope of the variable."
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
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.