I have the following code loading wirebox and logbox in my
if(!structKeyExists(application, 'wireBox') || !structKeyExists(application, 'logBox') || IsDefined("url.init_app")) { //NOTE CHANGE THE TMEOUT BACK TO 10 !!!!!!lock name=“createWireBoxAndLogboxInjectors” type=“exclusive” timeout=“0” {
/* Create the WireBox object and attach it to application.wireBox */
//Wirebox is leached into the application scope using the binder.
createObject(‘component’,‘coldbox.system.ioc.Injector’).init(‘epsys.config.coldbox.WireBox’);
//Logobox
/* Setup LogBox via the WireBox getInstance, instead of createObject */
objConfigData = application.wireBox.getInstance(“epsys.config.coldbox.epsysLogBoxConfig”);
objConfig = application.wireBox.getInstance(
name=“coldbox.system.logging.config.LogBoxConfig”
, initArguments={CFCConfig=objConfigData});
application.logBox = application.wireBox.getInstance(
name=“coldbox.system.logging.LogBox”
, initArguments={config=objConfig});
}
}
I am getting the an error
Variable OBJCONFIG is undefined
It appears to be processing this argument declaration first!
“, initArguments={config=objConfig});”
This only happens when the code is within a lock… can anyone explain this to me and propose a solution?
Thanks in advance
Alex