-
Notifications
You must be signed in to change notification settings - Fork 564
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
@ApplicationScoped does not work correctly in combination with @ServerEndpoint #7234
Labels
3.x
Issues for 3.x version branch
Comments
As a workaround, does it work correctly if the you create a helper bean in application scope and inject it into the endpoint class? |
It works correctly when using a helper bean in application scoped. |
spericas
added a commit
to spericas/helidon
that referenced
this issue
Jul 25, 2023
…sue helidon-io#7234. Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>
Thanks for fixing it so fast! |
Neoministein
added a commit
to Neoministein/NeoUtil
that referenced
this issue
Jul 26, 2023
This was referenced Aug 3, 2023
spericas
added a commit
to spericas/helidon
that referenced
this issue
Aug 8, 2023
…sue helidon-io#7234. (helidon-io#7245) Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>
dalexandrov
pushed a commit
to dalexandrov/helidon
that referenced
this issue
Aug 9, 2023
…sue helidon-io#7234. (helidon-io#7245) (helidon-io#7340) Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment Details
Problem Description
I've got a websocket endpoint that I've registered with the
@ServerEndpoint
annoation. I've also added the CDI scope@ApplicationScoped
to that class.When I open multiple connections to the endpoint only instance is created. However when I close a connection the instance of the endpoint is destroyed and a new one is created and therefore all data in it is lost.
I would expect that since I annoated it with
@ApplicationScoped
that it wouldn't be destroyed and stay alive until the application is shut down.Steps to reproduce
Here is a simple project with a test which recreates the issue.
Java code
I am using the following Helidon dependencies:
And non Helidon dependency:
Websocket endpoint:
Junit Test:
The text was updated successfully, but these errors were encountered: