Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to create the application/session scopes? #16

Open
redtopia opened this issue Oct 15, 2018 · 0 comments
Open

Is it possible to create the application/session scopes? #16

redtopia opened this issue Oct 15, 2018 · 0 comments

Comments

@redtopia
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant