WireBox Question - Need to map a model class to a coldbox property setting

Hey Everyone,

I have a class that sits outside of coldbox's control/influence that
is both referenced by my websocket event handler, and requires a
property stored in the coldbox settings. I'm used to other IOC
frameworks and WireBox seems fairly straightforward and robust.
However, I could really use some help injecting a
coldbox:setting:socketKey property into my socket emissary class. I
have a cfproperty defined based on the docs, but I'm struggling with
the mappings under the WireBox config.

On another note, what are your thoughts on IOC? I've used Spring for
building business rules engines, but I'm still trying to figure out
where the performance/efficiencies come in on a transactional
application such as the one we are building. Thanks for your
thoughts...Matt

Hmm, so what is the question?
WireBox can wire up any object in the entire server no matter where it is. So what is the issue?

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

Thanks Luis,

Not really an issue, I just need help on the mapping syntax. I have:

<cfproperty name="socketKey" inject="coldbox:setting:socketKey">

Sits in the emissary class. Provides value though getter.

My question is, how do I wire the coldbox setting to the property in
the wirebox map?

Thanks!

Ah ok. If you wrote the property then it is an annotation so it should be available already. The setting will come from the your application settings

Luis Majano
CEO
Ortus Solutions, Corp

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

Thanks Luis,
It looks like the socket channel event handlers are being called
directly by the application as a static class. Right now, I'm
instantiating my emissary directly from the static event handler. This
obviously isn't working because I have no way of referencing the
object that wirebox is instantiating. I will need to do further
research.

Does ColdBox allow me to access the APPLICATION scope directly from
within my models? The easy way to work around this would be to
instantiate directly to an application scoped map without going
through coldbox. I could place all of the necessary key/values needed
in the attached emissary.
Thanks!
Matt B

Sorry to waste your time :slight_smile:

I went ahead and created a map on the application scope. For some
reason I thought that I couldn't access the APP scope from outside of
coldbox.

I would suggest you inject the factory itself then, so you can access any object. too. I guess I need more code info to make a suggestion.

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

Thanks for your help Luis. Sometimes it just takes throwing it out
there before something sticks.

Matt B