I create a CFC with the same name as my application. From the other CFC,
in my constructor, I can do:

<cfinvoke components="cflib" method="getSettings"
returnVariable="settings">

Then my queries use settings.dsn.

My Application.cfm makes the same call so it can just global vars as
well. I use this instead of a app_globals file now.


I know it has been discouraged other than for debugging-type methods, but is it so wrong to put the global settings as a method in the WEB-INF/cftags/component.cfc so that every component inherits the settings automatically? It seems like it makes code maintenance a little easier (i.e., if you change the name of the CFC or method name that returns the settings, you have to refactor every CFC in your app).


Just throwing it out there to see people's thoughts.

Regards,
Dave.

_________________________________________________________________
Help protect your PC. Get a FREE computer virus scan online from McAfee. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' in the message of the email.


CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]

Reply via email to