Skip to content
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

Fix dynamic Websocket endpoints for SockJS #3581

Merged
merged 3 commits into from Jun 15, 2021

Conversation

artembilan
Copy link
Member

Related to https://stackoverflow.com/questions/67971467/registration-of-dynamic-websocket-at-application-initialization-time-and-at-runt

The SockJS wrapper for dynamic endpoint is not initialized properly.
Technically we just don't map to the SockJS service if such one is requested from the ServerWebSocketContainer configuration

  • Postpone the path mapping for the target endpoint until after the ServerWebSocketContainer applies all the options
    into its registration to expose.
  • Fix ServerWebSocketContainer to propagate a default TaskScheduler for underlying SockJS Service on the endpoint
  • Fix IntegrationDynamicWebSocketHandlerMapping to deal with path patterns as well, which is the case for the mentioned SockJS wrapper:
    the SockJS Service is able to handle the rest of the path according its setting and request requirements

Related to https://stackoverflow.com/questions/67971467/registration-of-dynamic-websocket-at-application-initialization-time-and-at-runt

The SockJS wrapper for dynamic endpoint is not initialized properly.
Technically we just don't map to the SockJS service if such one is requested from the `ServerWebSocketContainer` configuration

* Postpone the path mapping for the target endpoint until after the `ServerWebSocketContainer` applies all the options
into its registration to expose.
* Fix `ServerWebSocketContainer` to propagate a default `TaskScheduler` for underlying SockJS Service on the endpoint
* Fix `IntegrationDynamicWebSocketHandlerMapping` to deal with path patterns as well,  which is the case for the mentioned SockJS wrapper:
the SockJS Service is able to handle the rest of the path according its setting and request requirements
* Add Javadoc for new `ServerWebSocketContainer.setSockJsTaskScheduler()` API
@garyrussell garyrussell merged commit 93743f6 into spring-projects:main Jun 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants