... and the "cfquery" struct is stored in the variables scope, which is why this works:
<cffunction name="myFunction"...> ����� <cfset var q = ""/> ����� <cfquery name="q"> ����������� SELECT * FROM Users ����� </cfquery> ����� <cfset reportExecutionTime()/> ����� <cfreturn q/> </cffunction>
<cffunction name="reportExecutionTime"> ����� <cflog text="#cfquery.executionTime#"/> </cffunction>
Which means that using "cfquery.*" is not thread safe if your CFC instance is in a shared scope. That's not good.
What about other 'tag scope' variables like "cfhttp.*" and "cffile.*"? It sounds like we can't write a CFC to handle file upload and store it in application scope, for instance, since multiple simultaneous requests to upload files would trample on each other's (variables.)cffile.* information?
There does not appear to be a way to scope the "cfquery" struct just to the myFunction function. Is this something people feel they need? I personally have never had an issue with behavior, but if others have, we can see about getting it changed.
I think that every tag that creates its own 'scope' like this ought to do so as if it were declared with 'var' so that the tags are thread safe...
Sean A Corfield -- http://www.corfield.org/blog/
Got Mach II? -- http://www.mach-ii.com/
---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com).
An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]
