this would be better

<CFLOCK SCOPE="SESSION" TYPE="READONLY" TIMEOUT="10">
        <cfset locValue = session.value>
</CFLOCK>

<CFIF locValue EQ 0>
        <CFINCLUDE TEMPLATE="somecfml.cfm">
</CFIF>

-----Original Message-----
From: Terry Bader [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 11, 2001 1:32 PM
To: CF-Talk
Subject: LOCKING


ok, question about locking....

let's say I have code like this:

<CFLOCK SCOPE="SESSION" TYPE="READONLY" TIMEOUT="10">
        <CFIF session.value EQ 0>
                <CFINCLUDE TEMPLATE="somecfml.cfm">
        </CFIF>
</CFLOCK>

And somecfml.cfm might possible need to write to the session scope.

Now, my question is, does the Lock in the calling cfm page follow down into
the included page?


just wondering because with a complex Conditional statement checking against
session variables, though you may be only reading from the session scope
while running the checks, you might just have to write to the session scope
somewhere inside....
so if the lock does follow the INCLUDES then I guess the whole thing will
have to be EXECLUSIVELY locked...


        Terry Bader
        IT/Web Specialist
        EDO Corp - Combat Systems
        (757) 424-1004 ext 361 - Work
        [EMAIL PROTECTED]   


        (757)581-5981 - Mobile
        [EMAIL PROTECTED]
        icq: 5202487   aim: lv2bounce
        http://www.cs.odu.edu/~bader
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to