Skip to main content
Inspiring
January 15, 2011
Answered

CFDump multiple applications from a single file

  • January 15, 2011
  • 1 reply
  • 490 views

I have multiple applications running on a single CFMX7 server. I want to be able to run a single diagnostic template, outside of any of those applications, that will simply dump all application scopes. I've read that I could do it this way:

<cfapplication name="FirstApp">

<cfdump var="#application#">

<cfapplication name="SecondApp">

<cfdump var="#application#">

...and so on.

My question: when I invoke cfapplication for FirstApp in the diagnostic template, how am I affecting the 'real' FirstApp? It seems to me that this method would be attempting to create a second instance of FirstApp. Would that not cause problems? Am I missing something about how cfapplication works?

This topic has been closed for replies.
Correct answer Adam Cameron.

All the app name is is a label CF uses to allow the code to identify which application it's using.  You'd never created a duplicate of an app, and more than any two normal requests hitting the same-named <cfapplication> tag would.  The application is not bound to the file the <cfapplication> tag is in, or anything to do with the file system at all.  The application resides solely in memory, and - to reiterate - all the application name is is a handle to match a request to an application.

The most you might expect is if that app had timed out, you'd re-init it by referencing it in your dump template.

--

Adam

1 reply

Adam Cameron.Correct answer
Inspiring
January 15, 2011

All the app name is is a label CF uses to allow the code to identify which application it's using.  You'd never created a duplicate of an app, and more than any two normal requests hitting the same-named <cfapplication> tag would.  The application is not bound to the file the <cfapplication> tag is in, or anything to do with the file system at all.  The application resides solely in memory, and - to reiterate - all the application name is is a handle to match a request to an application.

The most you might expect is if that app had timed out, you'd re-init it by referencing it in your dump template.

--

Adam

Inspiring
January 15, 2011

Thanks for clarification.