Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Force application to end using code

Guest
Jul 22, 2009 Jul 22, 2009

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?

TOPICS
Advanced techniques
913
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Jul 22, 2009 Jul 22, 2009

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 22, 2009 Jul 22, 2009
LATEST

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!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources