8476: Websocket server is tied to JfrEditor#698
8476: Websocket server is tied to JfrEditor#698aptmac wants to merge 1 commit intoopenjdk:masterfrom
Conversation
|
👋 Welcome back aptmac! A progress list of the required criteria for merging this PR into |
|
@aptmac This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 6 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
|
/integrate |
|
Going to push as commit f9ba5ef.
Your commit was automatically rebased without conflicts. |
This PR addresses JMC-8476, in which the current websocket server implemention ties the server to a JfrEditor page.
At the moment, the Websocket server that is used to send selection data is created from within a JfrEditor page. So every time you open a new recording file, the JfrEditor code tries to start a new websocket server. This is a problem because there is only one field in the JMC settings to set the port number, and it is global to the application. So if I open recording-1, and then use the preferences menu to start the websocket server on port 8029, if I then open up recording-2 it will also try to open a websocket server on port 8029, and fail. As a result, sending data from recording-1 will work, but recording-2 will not (this can be seen in my "before" gif below).
I have extracted the websocket code out into it's own package and made it such that there is one server for the JMC application. So now if you toggle between recordings you can still send data to whatever application you want over websocket.
Before:

(exception thrown when trying to send events from the second recording)
After:

(selecting events from multiple recordings now works)
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jmc.git pull/698/head:pull/698$ git checkout pull/698Update a local copy of the PR:
$ git checkout pull/698$ git pull https://git.openjdk.org/jmc.git pull/698/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 698View PR using the GUI difftool:
$ git pr show -t 698Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jmc/pull/698.diff
Using Webrev
Link to Webrev Comment