Huh, not sure what happened with the formatting on that.  Here you go:

<cfset application.setIsInited(false) />

Thanks,

Eric Cobb
ECAR Technologies, LLC
http://www.ecartech.com
http://www.cfgears.com



Eric Cobb wrote:
> Here's the poor mans answer to applicationStop(), it works on CF7 & CF8.
>
> |<||cfset| |application.setIsInited(false) />
> |
> See Mister Dai for a more detailed explanation:
> http://misterdai.wordpress.com/2010/06/11/cf-flag-application-to-run-onapplicationstart/
> |
> |
>
> Thanks,
>
> Eric Cobb
> ECAR Technologies, LLC
> http://www.ecartech.com
> http://www.cfgears.com
>
>
>
> Raymond Camden wrote:
>   
>> That's by design. CF knows when an application starts. You can 'force'
>> it a few ways.
>>
>> 1) In CF9, within onRequestStart, add a check for url.init (or some
>> such), and run applicationStop(), you then need to reload the current
>> request.
>> 2) Or even simpler, within onRequestStart, add a check for a url var
>> and simply do
>>
>> onApplicationStart();
>>
>> This will NOT single thread the call, but if you are just setting up a
>> bunch of variables, you most likely do not need to be concerned.
>>
>> 3) I don't really recommend this, but you can also just rename the 
>> application.
>>
>>
>> On Wed, Aug 4, 2010 at 2:56 PM, Matt Coldfusion <i...@fusionserve.net> wrote:
>>   
>>     
>>> This doesnt work for me and I cannot work out why?
>>> I run onApplicationStart in application.cfc and all my old application 
>>> variables still exist, i have to restart the service all the time but i 
>>> can't do this on my shared server.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>     
>>>       
>>>>> What is another way besides creating a temp file to explicitly reset
>>>>> those variables?
>>>>> Is there a way to make the Application expire and restart (sort of
>>>>> speak)?
>>>>>         
>>>>>           
>>>> Here's what I use:
>>>>
>>>> <cffunction name="onRequestStart" returntype="void" output="false">
>>>>  <cfif structKeyExists(url,"reinitApp")>
>>>>    <cflock scope="application" type="exclusive" timeout="5" 
>>>> throwontimeout="true">
>>>>      <cfset onApplicationStart()>
>>>>    </cflock>
>>>>  </cfif>
>>>> </cffunction>
>>>>
>>>> Then add ?reinitApp=1 in any url to restart the app
>>>>
>>>> Will
>>>>       
>>>>         
>>>     
>>>       
>>     
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335999
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to