Autowire remote proxies, changed to manual instead of automatic

Description

UPDATE
The original feature introduces problems when doing testing and when leveraging ORM event handling. Please see comments.

Description
Automatically autowire remote proxies so they can automatically take advantage of mixins and AOP. Since "this" in a super class's pseduo constructor is a reference to the super class and not the sub class, use the cgi.script_name to determine the path of the proxy and get the metadata from there.

Activity

Show:
Luis Majano
March 10, 2016, 8:26 PM

That's a very good point

Brad Wood
March 29, 2016, 7:16 PM
Edited

What kind of issues were happening? The code was already set up to only fire for explicit access to a CFC from the URL. If you're simply extending the proxy, the autowire shouldn't have been kicking in:

Luis Majano
March 29, 2016, 8:18 PM

It was still kicking in for Entities (ORM objects)

Brad Wood
March 29, 2016, 9:11 PM
Edited

I wonder if the code above just needed to be modified. Did your tests hit a CFC file directly in the URl to run? The only way autowire should run is if a CFC is being hit directly.

Did you test your fix? It doesn't work. See my comments in Github, The base class runs its pseudo constructor first, which means setting `this.autowire` in the sub class is never read. We're going to have to back out your "fix' or it will permanently break anyone's code using autowired proxies.

Brad Wood
March 29, 2016, 9:28 PM

Can you show me specifically how to reproduce the problem scenario so I can try and resolve this? I think we just need to improve the detection that tries to see if we're running a remote CFC directly.

Fixed

Assignee

Luis Majano

Reporter

Brad Wood

Labels

None

Components

Fix versions

Affects versions

Priority

Major
Configure