I don't know the exact, internal details, but application.cfc is called on each 
request and knows ONLY about the current request.  Other than putting data into 
scopes such as application, sesssion or server, nothing is kept from one 
request to another, within application.cfc.
 
In this respect, application.cfc is the same as application.cfm.
 
Mike

  _____  

From: Martijn van der Woud [mailto:[EMAIL PROTECTED]
Sent: Mon 11/24/2008 1:31 PM
To: cf-talk
Subject: Re: Application.cfc question



Just curious: can anyone tell a bit more on how exactly Application.cfc is 
executed? With normal cfc's I believe that the code above the first method runs 
only when a new instance of the cfc is created, or when the cfc is invoked as a 
static component. It seems a bit strange to me that the

<cfif isDefined("url.reloadConfig") AND (isBoolean(url.reloadConfig) AND 
url.reloadConfig)>    
   <cfset onApplicationStart() >  
</cfif>  
<cfif isDefined("url.reloadSession") AND (isBoolean(url.reloadSession) AND 
url.reloadSession)>    
   <cfset onSessionStart() >  
</cfif>

are even executed. Does this mean that a new instance of Application.cfc is 
created for every request, or that it is invoked statically? I would have 
expected that one instance is shared across requests within an application.

Martijn van der Woud

>Move both cfif blocks to the onRequestStart() method so they run a
>little bit later.
>
>Jochem



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315858
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to