Heya Andrew,

thanks for the info...

AS> application scope for us if it is needed. But we still uses locks as a safe
AS> measure, not sure if this would cause any race conditions or 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 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 level
AS> constants these days? By constants I mean things like DSN, database login
AS> 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 setting
AS> 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 me it
AS> looks like there's an overhead on every page call in setting these
AS> variables.

AS> OR

AS> Doing it at a session level.

AS> OR

AS> Some sort of 'constants' structure so there's only 1 application variable,
AS> 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/

Reply via email to