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

New CDI scope SessionCacheScoped #414

Open
beikov opened this issue Oct 15, 2020 · 2 comments
Open

New CDI scope SessionCacheScoped #414

beikov opened this issue Oct 15, 2020 · 2 comments

Comments

@beikov
Copy link

beikov commented Oct 15, 2020

Crossposting: jakartaee/cdi#456

I would like to propose a new scope called @SessionCacheScoped with an optional cache name. The purpose of the scope is, that data is associated with a session without using the HttpSession as storage. I often associate some data that I loaded from the database with a user session and using @SessionScoped is usually fine, but in a clustered setup this becomes a problem due to session replication overhead. To avoid these issue, I would like to put the beans into a local cache instead which is associated with the session.

One might think that this kind of scope should be provided by JCache(JSR 107), but since it is not part of Jakarta EE (yet), I wanted to post it here and maybe start a discussion about the possible inclusion of the JCache API.

@cruftex
Copy link
Member

cruftex commented Oct 15, 2020

I doubt that JSR107 will get part of Jakarta EE since its still based on Java 6. It needs a major touch up, which is probably a new standard. Is there any issue / discussion around this one could follow?

@beikov
Copy link
Author

beikov commented Oct 15, 2020

I don't think that there is a discussion about this yet, but maybe now is the right time to start talking about this. Jakarta EE 9 (which was mainly about the namespace switch from javax to jakarta) is almost finished and work on new features/specs seems to have started. I would love to see a Jakarta Cache specification roughly based on what JSR107 already produced!

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

2 participants