Ryan,

We use Application.DSN = "blah" but we also put a check around this so that
if it's defined then it doesn't run again, and only setups up the
application scope for us if it is needed. But we still uses locks as a safe
measure, not sure if this would cause any race conditions or not, but would
like to hear from other on that one. 


 
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 1:24 PM
To: CFAussie Mailing List
Subject: [cfaussie] Managing application constants

Hey all,

Just wondering how in CFMX people are managing their application level
constants these days? By constants I mean things like DSN, database login
details etc, in the Application.cfm file.

Peeking around the net I've found references to:

<CFSET application.dsn = "blah">
with and without locking. Do this only when needed, and it avoids setting
variables on every request.

OR

<CFSET request.dsn = "blah">
This avoids any locking issues (but IS this still an issue?), but to me it
looks like there's an overhead on every page call in setting these
variables.

OR

Doing it at a session level.

OR

Some sort of 'constants' structure so there's only 1 application variable,
and you reference nodes within that to get the values.

What's the best practice in this case?

-----------------------
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/

Reply via email to