RE: [coldbox:17028] Re: [3.5.3] AOP/Wirebox Config Problems

Glad we could help :slight_smile:

What did you do to get it working?



ColdBox Platform Evangelist
Ortus Solutions, Corp

ColdBox Platform:

It ended up being a problem with the first dependency in the Aspect.

This is STILL a problem. I have the Aspect/advice working, but I can’t inject 1/3 of the dependencies

For some reason, when I attempt that injection, the whole thing blows up without any clear error message.

That particular property definition / injection syntax is used in other places in the app w/o problem (I copy/pasted to be sure).

Here’s a video of the fault…

Any ideas?

I dug into it a bit further…

In the SessionService I inject an Auth service in which I inject a PasswordAuth service in which I inject the ShortURL service which has the setting injection that’s failing…

It looks like a race condition where the module/settings aren’t yet initialized by the time the dependencies are being processed for the Aspect.

Any ideas on how to avoid this race condition?


Basically, these 3 properties are not available for injection at the time the Aspect is being set up:

property name=“shortURLBaseURL” inject=“coldbox:setting:modulePath@vtmo-shorturl”;
property name=“hashChars” inject=“coldbox:setting:hashChars@vtmo-shorturl”;
property name=“baseURL” inject=“coldbox:setting:sesBaseURL”;

I can/will rework the code to pull these values at run time, but I imagine I’ll start to have problems in the future with other dependencies when I want to do more advanced stuff.

Is there a way to defer the AOP setup until after configuration/settings have been fully initialized?

Inject them as providers

Luis Majano
Ortus Solutions, Corp

ColdBox Platform:
Linked In:
Social: | |