My application.cfc begings with the following component definition
Later in my application.cfc I initialise wirebox by doing the following.
createObject(‘component’,‘coldbox.system.ioc.Injector’).init(‘epsys.config.coldbox.WireBox’);
I have setup my WireBox.cfc config file to register wirebox in the application scope.
Unfortunately some of the mappings I have setup in my WireBox.cfc are unavailable after the app has loaded.
e.g. application.wirebox.getInstance(‘MyInstance’); causes an error that it cannot find the instance.
After some logging it seems that the following process occurs.
- ColdBox.cfc config file is loaded.
- Application.cfc is run and in turn my WireBox.cfc is registered into application scope
- ColdBox.cfc config is run again??
When I remove the extends=“coldbox.system.Coldbox” from my application.cfc … I get an error because my coldbox event cannot fire…
However my mapping then become available within application.wirebox!!!
I have tried to resolve my situation by setting up wirebox directly in my coldbox.cfc
adding
,wirebox = {
enabled = true,
binder = ‘myapp.config.coldbox.WireBox’
}
But unfortunately the binder does not load at all in when I do this!
thanks for any help
Alex