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:
...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?
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.
Thanks for clarification.