I just recently switched to Coldbox 3.5 and went from using Coldspring
to Wirebox.
I removed all references to getPlugin('ioc').getBean('myModelObject')
as well as all references to getMyPlugin('myPlugin') and
getPlugin('messagebox') and replaced them with the following notation:
// top of the handler
component name="Page" extends="coldbox.system.eventhandler"
output="false" autowire="true" singleton {
not that is fine, but your injection is wrong. This will cause memory leaks as you are injecting a volatile object into your handler which is a singleton. So if you utility object expires then we are in limbo. This side effect is called scope widening injection: http://wiki.coldbox.org/wiki/WireBox.cfm#Scope_Widening_Injection
I would suggest you either get the plugin when you need it via getMyPlugin() and put it in rc or prc scope and use it. Else, inject it as a provider if you still want the plugin to expire.
Ah, I see... That makes a lot of sense and sounds like my exact issue.
This being the case, when would you want to inject using a property?
Only when you are not caching the calling object? Would you recommend
that I also use getModel() to get my singleton model objects, rather
than using the property notation?
I just verified that my two model objects that seem to have dropped
off are singletons, but my plugins aren't. I will change the plugins
so that they are doing getPlugin() and getMyPlugin(), but can you
think of any reason why the singleton model objects would be expiring,
when the singleton handlers do not? Maybe I am not fully understanding
the issue.