At 08:10 PM 6/26/2002 -0400, you wrote: > > It is a documented best practice, and many will attest to the >experience. > > If you copy the variable to the local scope (as you suggest) you do not > > have to lock the local variable. However, why are you storing the >variable > > in the application scope if you are going to copy it into the variables > > scope on each page request? > > Also, copying the variable into the local scope does not negate the need > > to lock the application scope. > >That's why, as I mentioned in another response to this thread, I don't use >application variables -- I use an included constants file and set >local-scope variables on each page call.
Very good then. That is what I would recommend also. >Also, I never said that you didn't need to lock the application scope. In >code that I've inherited where shared-scope variables are used, my first >order of business is *always* to check for proper locking. Rather, I just >said that you don't need to lock an *entire query* because your datasource >name is set to a application-scope variable (though I still want to >reiterate that race conditions are a different matter). My understanding of your words was that storing the datasource in an application variable is good because you can copy it into the local scope and avoid locking. That is a resolution of the problem, but does not address the issue of using an application variable to store the datasource. :) It is kind of like saying "I lost my keys, have you seen them?" and answer "Break a window to get into the house." -- Jeffry Houser | mailto:[EMAIL PROTECTED] Need a Web Developer? Contact me! AIM: Reboog711 | Fax / Phone: 1-203-379-0773 -- My CFMX Book: <http://www.amazon.com/exec/obidos/ASIN/0072225564/instantcoldfu-20> My Books: http://www.instantcoldfusion.com My Band: http://www.farcryfly.com ______________________________________________________________________ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm 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

