Palyne,

I agree with Jeremy's comment 100%.  Again, my personal experience is that
we had some problems with CF5 when our scoped variables were not locked
(yes - ALL of them).  The more current wisdom is to use schemes which avoid
this by moving as many things as possible to request scope or to use client
variables (in an external database) rather than use application, session or
server variables.

There is an interesting article on page 46 of the current ColdFusion
Developers Journal.  The article Jeremy pointed out is also good.  In fact,
there is an update there that says putting the lock around the query is bad
(as Jeremy pointed out).  This is an update from my training at Allaire,
where I was taught to put them around the query.

Bottom line is that you better test your code thoroughly. I had never taken
the CFLOCK issue that serious until we started having some problems when we
brought our application up under CF 5.  My guess is that one of the way they
have gotten the performance gains is to enhance the use of multithreading
and multitasking - thus increasing the chance of corrupting data in memory.
If you start getting pcode errors, you had better go back and lock shared
scope variables or change the scope of your variables.

Using the extended find feature of Studio, you can locate the variables very
quickly.  I would suggest setting up code snippets (and assigning a short
cut) that would also save a lot of typing (and thus typos).

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Palyne Gaenir
Sent: Monday, November 26, 2001 11:44 PM
To: [EMAIL PROTECTED]
Subject: RE: differences in cf 4.5 vs cf 5


Dear Dave,

Do your comments below infer that all the applications I have created
the last few years which may use a session.value, I have to go
through every page on every site and find all the session var
references and put cflock tags around every one?  Boy.  That's a lot
of work, if so....

Palyne

On 21 Nov 2001, at 10:17, Dave Cahall wrote:
> I do not think this should be effecting your page, but I notice
> that you do not have CFLOCK tags around your queries and you are
> using a session variable for the datasource name.  You could also
> convert the datasource name to the request scope in your
> Application.cfm file and avoid the need for the CFLOCK tags (which
> I highly recommend).  My experience says this will be a REAL
> problem in CF 5.0 is you have shared scope variables without using
> CFLOCK tags.


-------------------------------------------------------------------------
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info: www.mailshield.com

-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org


-------------------------------------------------------------------------
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info: www.mailshield.com

-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org

Reply via email to