Hi guys,
I create a Dao and place it in the application scope when the app first loads. The init method for my Dao is as follows:
<cfcomponent displayname="MyDAO">
<cfset variables.dsn = '' />
<cffunction name= "Init" access="public" returntype="MyDAO" output="false">
<cfargument name="dsn" type="string" required="true">
<cfset variables.dsn = arguments.dsn />
<cfreturn this />
</cffunction>
Variables.dsn is written once during the init method but is read by each data-access method thereafter. Do I have to worry about locking / race conditions? And would it be more efficient to pass the dsn into each data-access method
Cheers, Pete (aka lad4bear)
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).
CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm
An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
