RE: [coldbox:17116] Re: [Tip of the Week] Using singletonReload for Development

Assuming that you are just manually creating an instance of the WireBox injector and storing it somewhere likeyour application scope, have you tried something like this:

application.WireBox.clearSingletons();

That will clear our the singleton scope without reloading all your mappings in the binder. If you still have any concurrency issues, the only real fix would be to wrap a readonly named lock around every page in your app (or at least every usage of WireBox) and then put an exclusive named lock (of the same name) around the line of code above. That would keep anyone from using WireBox while it was clearing singletons. This is basically what the ColdBox framework does when reinitting so all incoming requests have to wait while it’s reinitting.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

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