Strange FuseBox Bug

I encountered a strange problem at work the other day. I started getting all kinds of strange fusebox errors, mostly saying that fuses were undefined, that did exist, and the default was looking for a fuse that did not exist! Pretty much drove me insane. The application has 2 "parts" the main site and the admin. In the main site, I am tracking the number of active sessions and a couple other vars. I wanted to be able to check the values of those variables from the admin, so in the Application.cfc of the admin, I specified the same name as the main site. I.e.

/*Main Site Application.cfc*/
this.name="MainSite";

/*Admin Application.cfc*/
this.name="MainSite";


I had done this numerous times, in various locations with no problem. Somehow (don't ask me how) I realized that all of fusebox is loaded in the application scope and the bug was occured if the app.cfc that was loaded into memory was the admin app.cfc, then you went to the front of the site (mainSite) it would break, because it was using the fusebox vars from the admin, and thus looking for fuses that don't exist, and not finding fuses that do exist. Anyway, I'm not entirely sure on what exacly was going on, however, I do know that once I name the applications unique names, I have not had the problem since. I now store the vars in the server scope, so that I can hit them from any application.

I create a struct in the Server scope for each site on the server, with active sessions etc.

Has anyone else encountered a problem like this?

Comments
BlogCFC was created by Raymond Camden. This blog is running version 5.8.001.