> Hi,
> I am running a query and setting my application, request
> and client vars
> in the loop like that
> <CFOutput Query="GetVars">
> <CFParam name="#VariableName#" Default=
> "#VariableValue#">
> </cfQuery>
> I am not using session varaibles at all but only CLIENT,
> REQUEST,
> APPLICATION. Which type of LOCK and which order is
> recommended in this
> particular scenario - provided that deadlocks are avoided
> as well......
You shouldn't necessarily need to lock the client variables, and definitely not the
request variables... and I don't think CF _can_ create deadlock scenarios (although I
could be wrong)...
Assuming CF5 this is your best bet:
<cfoutput query="getvars">
<cfif listfirst(variablename,".") is "application">
<cflock scope="application" type="exclusive" timeout="10">
<cfparam name="#variablename#" default="#variablevalue#">
</cflock>
<cfelse>
<cfparam name="#variablename#" default="#variablevalue#">
</cfif>
</cfoutput>
On CFMX you cuold use a named lock instead, but I don't see any significant reason not
to use this code in either case.
s. isaac dealey 972-490-6624
new epoch http://www.turnkey.to
lead architect, tapestry cms http://products.turnkey.to
tapestry api is opensource http://www.turnkey.to/tapi
certified advanced coldfusion 5 developer
http://www.macromedia.com/v1/handlers/index.cfm?ID=21816
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.
http://www.cfhosting.com
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4