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

I’m pretty certain ColdBox does use locks to retain consistency within the framework both at the top level during reinits as well as in the handlerService during handler creation, but it’s always possible there’s a bug in there.

I guess the first thing I’d do to test it would be create a handler with a long sleep() at the top of it and then set a variable below that. Then reinit the framework in one window and attempt to hit the same handler in the second window. See if you can get the framework to use the new handler in the second window before the first request has completed.


Brad – that sounds familiar.

Most of my errors come from ajax “panels” – multiple “panels” load at the same time (and intermittently refresh themselves), and one panel will get the error (for example). I refresh manually, and the error is gone…

Is this what you were recommending?

component name="test" accessors="true" autowire="true" singleton {
    this.test = 'blah';

  // init
  public test function init(controller){
    return this;

  public function test(event,rc,prc){
    writeDump(this); abort;

I reinited and then ran the test function. It did wait until the
reinit was finished, so that seemed to have worked properly. I wonder
if there are any cases where this could fail, maybe when multiple
objects are injecting the same object... I am at a loss

Another thought... Is it possible that this could be caused by
clearing the coldfusion cache? We cache on our production server and
clear this when we push new code. I just did a push and received one
of the errors I indicated above (Variable OBUGLOG is undefined.),
which is an object that was injected: <cfproperty name="oBugLog"
inject="coldbox:myplugin:buglog" />