Skip to content

8476: Websocket server is tied to JfrEditor#698

Closed
aptmac wants to merge 1 commit intoopenjdk:masterfrom
aptmac:8476
Closed

8476: Websocket server is tied to JfrEditor#698
aptmac wants to merge 1 commit intoopenjdk:masterfrom
aptmac:8476

Conversation

@aptmac
Copy link
Copy Markdown
Member

@aptmac aptmac commented Jan 7, 2026

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)
before

After:
(selecting events from multiple recordings now works)
after


Progress

  • Commit message must refer to an issue
  • Change must be properly reviewed (1 review required, with at least 1 Committer)

Issue

  • JMC-8476: Websocket server is tied to JfrEditor (Enhancement - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jmc.git pull/698/head:pull/698
$ git checkout pull/698

Update a local copy of the PR:
$ git checkout pull/698
$ git pull https://git.openjdk.org/jmc.git pull/698/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 698

View PR using the GUI difftool:
$ git pr show -t 698

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jmc/pull/698.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link
Copy Markdown

bridgekeeper Bot commented Jan 7, 2026

👋 Welcome back aptmac! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link
Copy Markdown

openjdk Bot commented Jan 7, 2026

@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:

8476: Websocket server is tied to JfrEditor

Reviewed-by: hirt

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 master branch:

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 master branch, type /integrate in a new comment.

@openjdk openjdk Bot added the rfr label Jan 7, 2026
@mlbridge
Copy link
Copy Markdown

mlbridge Bot commented Jan 7, 2026

Webrevs

Copy link
Copy Markdown
Member

@thegreystone thegreystone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice! :)

@openjdk openjdk Bot added the ready label Feb 2, 2026
@aptmac
Copy link
Copy Markdown
Member Author

aptmac commented Feb 2, 2026

/integrate

@openjdk
Copy link
Copy Markdown

openjdk Bot commented Feb 2, 2026

Going to push as commit f9ba5ef.
Since your change was applied there have been 7 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

@openjdk openjdk Bot added the integrated label Feb 2, 2026
@openjdk openjdk Bot closed this Feb 2, 2026
@openjdk openjdk Bot removed ready rfr labels Feb 2, 2026
@openjdk
Copy link
Copy Markdown

openjdk Bot commented Feb 2, 2026

@aptmac Pushed as commit f9ba5ef.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants