Copy link to clipboard
Copied
I am working on specific functionality in the application.cfc and need to see what is happening when an application starts and ends (onApplicationStart and onApplicationEnd methods). Outside of stopping and starting ColdFusion itself, and without playing with the "applicationtimeout" setting, is there any way using code to force an application to end?
Copy link to clipboard
Copied
Have you tried something like:
<cfinvoke method="onApplicationEnd">
<cfinvokeargument name="ApplicationScope" value="#application#" />
</cfinvoke>
I haven't tried this myself by the CF documententation implies you can call the onApplicationEnd method in your code.
"If you call this method explicitly, ColdFusion does not end the application; it does execute the method code, but does not lock the Application scope while the method executes."
http://livedocs.adobe.com/coldfusion/8/htmldocs/AppEvents_04.html#1188612
Copy link to clipboard
Copied
That's what I'm doing now - I invoke the onApplicationEnd, passing the application scope and then the last line of that method, I invoke the onApplicationStart method. It works, but I would like to test the actually ending and starting. Unfortunately, nobody I've talked to has a solution. Perhaps it's a ColdFusion security issue - malicious code can't close the application?
Thanks for the reply, it's nice to know I'm not totally crazy on my approach!