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?

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

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… http://www.screencast.com/t/47JoGctl1

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?

Cheers,
ben

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
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Social: twitter.com/ortussolutions | twitter.com/coldbox | twitter.com/lmajano