RE: [coldbox:13621] Re: Issue with dependency injection in my handlers

I think that possibly what is happening is that the plugins are dropping
and their references are pointing to now non-existent objects…

It doesn’t work that way in Java. An object cannot be garbage collected UNTIL all references to it have been removed. That’s the whole reason scope widening exists.

If your issues are happening when a reinit is going on, I don’t think the issue is related to scope widening. I think there might be some timing problems where a thread is being allowed to use a handler, while another thread is still initializing it (and thus all of its dependencies have not been injected yet)

Thanks!

~Brad

Interesting… Any ideas on how to fix that? Is there a way to have all of the objects loaded before this can happen? (Perhaps a lock?)