> I'm struggling with implementing CFLOCK so it runs on BOTH CF
> 4.0.1 and 4.5.1. (The
> 4.5.1 server has FULL CHECKING on.)

> Given that 4.0.1 FORBIDS the SCOPE parameter in CFLOCK and 4.5.1
> REQUIRES it....

Allaire has allowed for this type of situation by presenting a way to turn
full checking off.  Do you have any control of the settings for the CF 4.5.1
server?  The way to make CFLOCK compatible to both version is to use named
locks, and leave full checking turned off (on 4.5).

Is turning off full checking going to slow your app down or crash it?  No.
It will only do that if you turn it off and forget to lock something, which
should really be tested for before production anyway.

> Any ideas besides repeating the entire CFLOCK block for each version?

Unfortunately, your specific set of requirements prevent you from taking
advantage of the backward compatible features of CFLOCK.  You can, however,
minimize the number of CFLOCKs in your code.  While not the most efficient
solution, you can always copy the LOCKED scope into a local variable, and
then deal with it unlocked.  IE:

<CFLOCK>
        <CFSET user = Duplicate(session) >
</CFLOCK>

<CFOUTPUT>#user.name#</CFOUTPUT>

The same could be done with the application or server scopes.  That way you
only have to deal with a few locks in your app, and the CFIFs required are
minimal.  Again, not the most efficient solution, but if you wanted
efficient, you probably would be developing your app exclusively for the
newest version of CF so that you could take advantage of all the new
features and tags..

-Cameron

--------------------
Cameron Childress
elliptIQ Inc.
p.770.460.7277.232
f.770.460.0963


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to