]
Marek Marusic reassigned WFLY-11672:
------------------------------------
Assignee: Marek Marusic (was: Matej Novotny)
@ApplicationScoped does not work when used with @ServerEndpoint
---------------------------------------------------------------
Key: WFLY-11672
URL:
https://issues.jboss.org/browse/WFLY-11672
Project: WildFly
Issue Type: Bug
Components: CDI / Weld, Web Sockets
Affects Versions: 15.0.1.Final
Reporter: Marek Marusic
Assignee: Marek Marusic
Priority: Major
Attachments: applicationScopedServerEndpoint.zip
When the @ApplicationScoped annotation is used in combination with @ServerEndpoint the
class is instantiated on every new connection instead of being instantiated once for the
whole application.
The expected behaviour:
There should be only one instance of the class which is annotated with @ApplicationScoped
and @ServerEndpoint annotations.
I have created a reproducer and added it as attachment.