-
Notifications
You must be signed in to change notification settings - Fork 729
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
@SessionScoped injection not working with @Push enabled (8.0.3+) #8967
Comments
The example project uses 8.0.2 which suffers from #8734 and therefore websockets do not work. It will fallback to long polling, which makes session scoped beans work because long polling uses normal HTTP requests. For 8.0.3+ websockets will work as expected, with the drawback that websockets do not enable SessionScope. See vaadin/cdi#88 and the spec issue at https://java.net/jira/browse/WEBSOCKET_SPEC-196 |
In most situations, @UIScoped should be enough. If it's a CDIxWS spec problem, I'll go with UIScoped until they solve this. Is it possible to display this in a exception message and documentation? |
Although I am not sure, I would be surprised if |
|
@Artur-, in vaadin/cdi#88 @hesara wrote
So one would presume that Simple full |
Note that there is an ongoing discussion how to get this fixed in Java EE 9 here: @Artur-, could Vaadin representatives also voice their perspective in the discussion? |
Note that you can use |
Hello there! It looks like this issue hasn't progressed lately. There are so many issues that we just can't deal them all within a reasonable timeframe. There are a couple of things you could help to get things rolling on this issue (this is an automated message, so expect that some of these are already in use):
Thanks again for your contributions! Even though we haven't been able to get this issue fixed, we hope you to report your findings and enhancement ideas in the future too! |
I closed this, since CDI add-on 3.0.0 provides workaround via @VaadinSessionScoped and #8734 and vaadin/cdi#88 are closed. |
I have never seen the example how to workaround @CDIView in Vaadin 8 with @VaadinSessionScoped. Can you pls send a link? |
Here is an example app, which uses it, i.e. there is a bean with @VaadinSessionScoped annotation and it is used for example here I recommend to download the whole app and play with it, it demonstrates the most typical CDI cases with Vaadin app. |
Vaadin version: 8.0.3+ and WildFly 10.1.0
Description of the bug
Using CDI, injection of a SessionScoped bean not working on events. Until 8.0.2, using a session bean on listeners works fine. But since 8.0.3 it doesn't work anymore. More precisely, since new Atmosphere (2.4.5.vaadin2) on #8785
Without @Push it works.
A complete example: https://github.com/ricardovm/session-problem-vaadin
The text was updated successfully, but these errors were encountered: