RE: [coldbox:16595] Problems with Model and Injections

Andrew is right, that property will signal WireBox to inject an instance of your service into the handler, but please remember- ONLY do this if your service is actually a singleton (A singleton is a class that only exists once for your entire application). The code that you showed us for your AuthenticationService does not appear to be intended to exist in a singleton, but instead appears to be representing a single user object since it stores Usermail and Userpass for a specific user. That is why I suggested dropping “service” from the name. Also, just for kicks, the autowire syntax can be shortened to this when wiring models by ID:

component {

property name=“AuthenticationService” inject;



ColdBox Platform Evangelist
Ortus Solutions, Corp

ColdBox Platform:

Please excuse my late reply, was away for several days. I am very pleased that I have received such detailed instructions.

I will be happy to customize the script immediately. If an error occurs again, I will inform you once again. :slight_smile: