Ryan, I always lock all writes if a race condition is going to happen it will be a write, and as far as reading I don't think a race condition can happen there since V5.0 someone might correct me on that.
Regards Andrew Scott Technical Consultant NuSphere Pty Ltd Level 2/33 Bank Street South Melbourne, Victoria, 3205 Phone: 03 9686 0485 - Fax: 03 9699 7976 -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ryan Sabir Sent: Wednesday, 20 April 2005 2:06 PM To: CFAussie Mailing List Subject: [cfaussie] RE: Managing application constants Heya Andrew, thanks for the info... AS> application scope for us if it is needed. But we still uses locks as AS> a safe measure, not sure if this would cause any race conditions or AS> not, but would Do you just lock the writing of this App variable? Or all the reads as well? I'd probably use locks as well, just to be safe. But if we are to believe the official word from Macrobe, then they are not needed unless a possible race condition exists. And I can't see how <CFSET application.dsn = "blah"> Could ever cause a race condition... maybe if you had something like: <CFSET application.dsn = "blah"> <CFSET application.dsnuser = "#application.dsn#user"> <CFSET application.dsnpass = "bloo"> But that's just silly now... bye! AS> Regards AS> Andrew Scott AS> Technical Consultant AS> NuSphere Pty Ltd AS> Level 2/33 Bank Street AS> South Melbourne, Victoria, 3205 AS> Phone: 03 9686 0485 - Fax: 03 9699 7976 AS> -----Original Message----- AS> From: [EMAIL PROTECTED] AS> [mailto:[EMAIL PROTECTED] On Behalf Of Ryan AS> Sabir AS> Sent: Wednesday, 20 April 2005 1:24 PM AS> To: CFAussie Mailing List AS> Subject: [cfaussie] Managing application constants AS> Hey all, AS> Just wondering how in CFMX people are managing their application AS> level constants these days? By constants I mean things like DSN, AS> database login details etc, in the Application.cfm file. AS> Peeking around the net I've found references to: AS> <CFSET application.dsn = "blah"> AS> with and without locking. Do this only when needed, and it avoids AS> setting variables on every request. AS> OR AS> <CFSET request.dsn = "blah"> AS> This avoids any locking issues (but IS this still an issue?), but to AS> me it looks like there's an overhead on every page call in setting AS> these variables. AS> OR AS> Doing it at a session level. AS> OR AS> Some sort of 'constants' structure so there's only 1 application AS> variable, and you reference nodes within that to get the values. AS> What's the best practice in this case? AS> ----------------------- AS> Ryan Sabir AS> Newgency Pty Ltd AS> 2a Broughton St AS> Paddington 2021 AS> Sydney, Australia AS> Ph (02) 9331 2133 AS> Fax (02) 9331 5199 AS> Mobile: 0411 512 454 AS> http://www.newgency.com/index.cfm?referer=rysig AS> --- AS> You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe AS> send a blank email to [EMAIL PROTECTED] AS> Aussie Macromedia Developers: http://lists.daemon.com.au/ AS> --- AS> You are currently subscribed to cfaussie as: [EMAIL PROTECTED] AS> To unsubscribe send a blank email to [EMAIL PROTECTED] AS> Aussie Macromedia Developers: http://lists.daemon.com.au/ ----------------------- Ryan Sabir Newgency Pty Ltd 2a Broughton St Paddington 2021 Sydney, Australia Ph (02) 9331 2133 Fax (02) 9331 5199 Mobile: 0411 512 454 http://www.newgency.com/index.cfm?referer=rysig --- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/ --- You are currently subscribed to cfaussie as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/
