LDEV-6277: expose wsClient.getSession()#20
Merged
Conversation
Listeners can now reach the underlying javax/jakarta websocket Session via wsClient.getSession() for getId(), getUserProperties(), and getRequestParameterMap(). The Session is already held by WSClient; this adds the dispatch key + branch. Also re-enables test-session-access (previously parked in CI pending this fix).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Exposes the underlying JSR-356
SessiononWSClientso listeners can reachgetId(),getUserProperties(), andgetRequestParameterMap(). The Session is already held by WSClient — this adds the dispatch key + branches.Ticket: LDEV-6277
Why this matters
WebSocket callbacks run in a synthetic PageContext with no CFML
session/cookiescope, so the JSR-356Sessionis the only per-connection state a listener has. Every per-user pattern — handshake auth via query-string token, multi-tab tracking, tagging a connection with auserId— depends on reaching it. Before this PR, callingwsClient.getSession()threwWSClient does not have the function [getSession].What changed
AbsWSClient.java— register thegetSessionkeyWSClient.java— add dispatch branch incall()andcallWithNamedValues(), expose inkeys[]andtoString()CHANGELOG.md+README.md— document the new accessor.github/workflows/main.yml— re-enabletest-session-accessin the integration loop (parked in tests: cover documented recipe claims that had no test #19 pending this fix)Test plan
test-session-accessflips from red to green (exercisesgetId()/getUserProperties()roundtrip /getRequestParameterMap()/ per-connection isolation)send,broadcast,isOpen,isClose,close) unchanged — additive only