CF mapping's for modules don't get created for proxy requests


It seems autowiring of modules over wirebox doesn't work if is called over the proxy. Not in the proxy itself and also not in the event handler if it is called via

Example: an event Handler called by the process method in the proxy

results in: Could not find the ColdFusion component or interface cbstorages.modelsSessionStorage.

Second: autowire in the proxy suufers from the same problem (path not found)

A temporary solution is to manually adding them to `this.mappings` in your `Application.cfc`

if autowire is not need in the proxy adding the code below to the pseudeo-constructor will work for the module paths in the eventhandler

The problem is the super class's pseduo constructor runs before the sub classes so putting it in your pseduo-constructor is still too late for autowiring in the proxy.

Comment in Slack from Brad (25-4-2016):
"The fix for this will be to add it to the base proxy's pseudo constructor before it autowires."


Brad Wood
April 27, 2016, 1:28 PM

Thanks for the ticket

Luis Majano
September 21, 2016, 9:43 PM

is this still an issue

Brad Wood
September 21, 2016, 10:32 PM

Yes it is. Basically, the same request setup that happens for a "normal" ColdBox needs to happen for proxy requests. We can run the logic the same way we autowire proxies. Basically, if you're going to use a module in your proxy request, the mappings need to be processed.

Luis Majano
September 21, 2016, 10:35 PM

Would his be for process event only?

Brad Wood
September 21, 2016, 10:41 PM

No, i would expect it for any request. Imagine if you ran getInstance( 'myservice@myModule' ) and the logic in that CFC needed the mapping to resolve an extends or implements keyword. Module mappings basically need to always exist regardless of whether an event is being executed.



Luis Majano


Daniel Schmid




Fix versions

Affects versions