Good question but I think it is a good idea to have the initialization in onRequestStart, at least during development, so you can reload the object using a url flag.


On 4/19/06, Geoff Parkhurst <[EMAIL PROTECTED]> wrote:
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf
Of Nando
> Sent: 19 April 2006 16:29
> Hence the double test locking code is recommended as best practice:
>
> <cfif not structKeyExists(application,"MyCFC")>
>       <cflock name="MyCFCLock" type="exclusive" timeout="10">
>           <cfif not structKeyExists(application,"MyCFC")>
>               <cfset application.MyCFC =
createObject("component","MyCFC").init() />
>           </cfif>
>       </cflock>
> </cfif>


Anyone know if this locking required when using the onApplicationStart in
your application.cfc? Or does onApplicationStart only fire once?

Regards,
Geoff




----------------------------------------------------------
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).

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



----------------------------------------------------------
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).

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

Reply via email to