-
Notifications
You must be signed in to change notification settings - Fork 6
Description
I'm unclear as to how I could leverage model code within my application that relies on the existence of an application scope. For example, in member.cfc:
component {
variables.dsn = application.config.dsn;
....
Since there is no application scope inside the listener code for a websocket, I cannot make this call (not to mention the mapping I typically use):
var member = createObject("common.cfc.member").init(userID);
Currently the way I got my websockets working is to replicate queries/logic that exist in my model layer. Understanding that this is not currently supported, would it be possible to create a page context for websockets so that you could access your application the same way as all your other code?
I know that we've spoken about this in the past, but would like to get a more clear understanding of what makes this impossible (if it is), or what impacts the choice to not implement it this way.
And if this is not possible, I would like to better understand what code changes I would need to make in order to gain access to model code that relies on the application scope, or how to remove dependencies on the application scope.