-
Notifications
You must be signed in to change notification settings - Fork 580
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
WebSocket: Annotated Endpoints always have contextRoot /websocket #1565
Comments
This is currently by design and somewhat similar to how Grpc is supported. What you suggest is different (and has other issues), but I'm not sure is better, and is certainly less consistent with the SE support. |
TBH my expectation is that the
...and as Servlet is not implemented in Helidon, it doesn't have to match. Therefore, can we at least be able to customise it? Otherwise, I'll have to put in horrible URL mappings to make the paths look consistent. |
So for an MP example:
I therefore cannot set a consistent context root, nor configure away from
Therefore in something like Istio I only need to set mapping for:
Instead, it would be:
|
To override the default for Web sockets you need to create a subclass of |
@spericas I just tried the I'll do some more testing first before I close this issue. QQ: were there specific conflict issues with gRPC or WebSocket handlers that were observed by sharing the same content root? From my quick test it seems I can interleave JAX-RS and WebSocket endpoints. |
@dansiviter It seemed like the separation of context roots would lead to fewer user surprises, but it sounds like it had the opposite effect in your app. Perhaps we should reconsider this decision before 2.0 goes final ... |
Environment Details
Problem Description
Using Microprofile WebSocket integration only apps initialised with
ServerApplicationConfig
can have theircontextRoot
set. If using pure annotated endpoints, then this always defaults to/websocket
. I feel there are two issues here:/websocket
as we may want to interleave the routing with Jersey or other routes,@RoutingPath
and that be honoured, but if it doesn't exist, use purely the value in@ServerEndpoint#value
.Issue is here: WebSocketCdiExtension
Steps to reproduce
Create any annotated WebSocket endpoint. You'll see the message:
The text was updated successfully, but these errors were encountered: