> I got locks on the brain after all these emails and it has got me
> questioning and requestioning a few things. Like...can I put a lock
> around an if statement if it contains a cflocation tag?
>
> <!--- i check to see if you are continuing a valid session or not --->
> <cflock scope="SESSION" type="READONLY" timeout="10">
> <cfif NOT ParameterExists(session.stMyCurrentSessionStructure)>
> <cflocation url="index.cfm?Fuseaction=#XFA.StartOver#"
> addtoken="No">
> </cfif>
> </cflock>
>
> ..or does the lock have to be closed? (therefore, I'd have to set a
> local variable on the read before the if)
What you should actually do is make a temporary variable to the session
variable - this is because the lock doesn't close before the CFLocation
You should do it like this;
<cflock scope="SESSION" type="READONLY" timeout="10">
<cfset tmpVar=isDefined("session.stMyCurrentSessionStructure")>
</cflock>
<cfif not tmpVar>
<cflocation url="index.cfm?Fuseaction=#XFA.StartOver#" addtoken="No">
</cfif>
Philip Arnold
Director
Certified ColdFusion Developer
ASP Multimedia Limited
T: +44 (0)20 8680 1133
"Websites for the real world"
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists