jakartaee / jakartaee/websocket
WebSocket Spec does not define the activation requirements of CDI Contexts
- Dominant language
- Java
- Stars
- 78
- Forks
- 47
- Avg merge
- 1h 32m
- Merged PRs (30d)
- 1
Description
Currently, a few issues are floating around regarding WebSocket spec and the activation (or lack there of) of CDI contexts. As was the case for the JMS spec & the JSF spec, the WebSocket spec must define what the activation is for CDI contexts when it comes to its methods. For example, "managed bean" is only mentioned once in the PFD however its notion is ambiguous:
Some of the non-api features of the Java WebSocket API are optional when the API is not implemented as part of the full Java EE platform, for example, the requirement that websocket endpoints be non-contextual managed beans (see Chapter 7). Such Java EE only features are clearly marked where they are described.
There is nothing in Chapter 7 that mentions "managed bean" as indicated in this chapter. So in my opinion, I think it's needed for the WebSocket spec to spell out that it expects Request Scope to be enabled during an @OnMessage method, and as a result must ensure that the context is initialized when the method is called.
#### Affected Versions
[1.0]
Contributor guide
Research direction
Start with Chapter 7 of the WebSocket specification and compare its CDI context language with the JMS and JSF specifications. Define the activation requirements for CDI contexts during WebSocket endpoint methods, especially @OnMessage, and clarify the managed bean requirement; the work is done when the specification explicitly states these expectations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend-api-design, documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100