[coldbox-4]: Method or variable to detect reinit

Is there a variable or method to detect if the site is being reinitialized? The reason is I wanted to run a piece of code only during fwreinit is called.
Something like:

if (is_fwreinit()) {
do this…


Thank you!

Yes, there is an interception point preReinit - “This occurs every time the framework is re-initialized”:




ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

You could probably hack the Application.cfc to do this on. But to keep it separate from the underlying framework etc.

I would use the preInit Interception point listed here myself.


That way you can do what you want to do. I am also assuming that being a preInit there is a very strong chance that the entire ColdBox framework is available as well.

Thanks guys! It’s working. I placed the code in an interceptor.


function preReinit(interceptData) {
// do something…