BoxLang: Our new JVM Dynamic Language made by Ortus! Check it out: https://www.boxlang.io

Issues

Select view

Select search mode

 

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

Fixed

Description

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."

Gliffy Diagrams

Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

Sentry

Created April 27, 2016 at 8:31 AM
Updated October 6, 2016 at 9:32 PM
Resolved October 6, 2016 at 9:32 PM

Activity

Show:

Brad WoodSeptember 21, 2016 at 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 MajanoSeptember 21, 2016 at 10:35 PM

Would his be for process event only?

Brad WoodSeptember 21, 2016 at 10:32 PM
Edited

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 MajanoSeptember 21, 2016 at 9:43 PM

is this still an issue

Brad WoodApril 27, 2016 at 1:28 PM

Thanks for the ticket