Actually, it locks that one piece of code in that one page, without
locking code on any other page. It's the equivalent of having a lock
name that you don't use in any other part of a page on any other page
in the application. It may not be particularly useful for SESSION
variables, as the expectation is that those variables might be used in
other parts of the app, but if they are never used anywhere else then
it would work.

>From the manual:

"Note: ColdFusion does not require you to identify exclusive locks. If
you omit the identifier, the lock is anonymous and you cannot
synchronize the code in the cflock tag block with any other code.
Anonymous locks do not cause errors when they protect a resource that
is used in a single code block, but they are bad programming practice.
You must always identify read-only locks."

http://livedocs.adobe.com/coldfusion/7/htmldocs/00001169.htm

On 7/18/07, Dave Watts <[EMAIL PROTECTED]> wrote:
> > I am curious as to what the expected behavior of cflock
> > should be without without a name or scope attribute:
> >
> > Sample Code:
> > <cflock timeout="60" throwontimeout="Yes">
> > <!--- setting of session variables ---> </cflock>
> >
> > Running CFMX 6.1, using FuseBox 3 (this is in the
> > FBX_FUSEBOX30_CF50.CFM file) in a Windows 2003 environment.
> >
> > What would you expect this to do??
>
> I would expect it not to work. The specific way it fails is pretty much
> irrelevant. It will either generate a "compile-time" error, or fail to lock
> anything. Either way, not good.

-- 
mxAjax / CFAjax docs and other useful articles:
http://www.bifrost.com.au/blog/

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ 

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:283956
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to