[coldbox-3.5.0-BE] Autowiring via dsl in handler not working


I configured Wirebox in my Coldbox.cfc like this:

//WireBox Integration
wireBox = {
enabled = true,
binder = ‘/config.WireBox’

/config is an application mapping that points to a location outside the webroot.

I have this in ColdBox.cfc

//Implicit Events
defaultEvent = “invoice.list”,
requestStartHandler = “Main.onRequestStart”,

In my Wirebox config I have this line:

// Map Bindings below

(as Luis explained in http://wiki.coldbox.org/wiki/WireBox.cfm this is all I need to define a mapping)

Finally in event handler Main I have this to get an instance of the SessionService injected:

Now I want to test if I do have an instance of SessionService like this:

This gives me

Application Execution ExceptionError Type: Expression : [N/A]

Error Messages: Element SESSIONSTORAGE is undefined in VARIABLES.

But it is there allright because if I request it via Wirebox like this:

I do get a dump off the cfc I requested.

So is autowiring via the DSL not working inm the Coldbox 3.5 Beta or am I missing something?

Btw I use Coldfusion 9.0.1


Ok, it occurred to me that the scanlocations setting might be interfering.

I have this in my WireBox.cfc:

// Package scan locations
scanLocations = ["/Application.model.Services","/Application.model.Gateways"],

My Services and Gateways are in the locations pointed to by the Application mapping /Application. Not sure if this “/” notation is the correct notation. Figured it might interfere so I just removed it and then had this:

// Package scan locations
scanLocations = [""],

Then I refreshed and Voila… there was the dump of my SessionService using the notation.

I changed the scanLocations setting back to

// Package scan locations
scanLocations = ["/Application.model.Services","/Application.model.Gateways"],

and the cfdump still showed up. I restarted the Coldfusion service and afterwards it still showed ok.

So it’s working now… and I’m happy. Strange since I had to change a setting to get autowiring and DSL working, got it working, undid the change and still have the result I want.