RFR: 7455: Add support for jolokia JMX service connection [v8]
Alex Macdonald
aptmac at openjdk.org
Thu May 2 18:20:16 UTC 2024
On Mon, 11 Mar 2024 15:52:18 GMT, Alex Macdonald <aptmac at openjdk.org> wrote:
> > @aptmac : I believe I have addressed all comments so far, apart from enabling coverage test (next on my list). Status: Test connection ✅ Do flight recording ✅ Open JMX console 🔴 - here I only get a spinner. I have tried to debug, but I'm struggling a bit with my debug setup
>
> Nice! I gave this a bit of a look and something interesting is going on but I can't tell just what yet. If I'm running the built application and connecting to jolokia I can confirm that JFR looks to be working correctly, and that the JMX Console pages are working.
>
> But, if I'm running it through Eclipse using our run configurations then the JMX Console pages are all blank (and this is true for any JVM and not just the one with jolokia attached to it). At the moment it's not obvious to me what's happening, the ConsoleEditor is running through the code okay to create the pages but for some reason nothing is showing up. I'll poke around a bit more when I can find some time.
I think this may end up being due to the Eclipse 2023-12 update..?
I've been using Eclipse 2023-03 IDE this whole time (quite a bit behind ..) and just noticed that even on the master branch it wasn't showing the JMX Console when running JMC using a run configuration.
I updated to 2023-12 IDE and now the JMX Console pages are showing as normal, both on the master branch and with this PR applied.
The only thing I can think of right now is that Eclipse 2023-12 had changes to use `jakarta.inject` (https://eclipse.dev/eclipse/news/4.30/platform.php#support-jakarta-annotations), and the Console pages make use of the `@Inject` annotation to create the page content. When using a debugger, I can see that the console pages are created but the `createPageContent` is never hit. However, the other methods in the page class (OverviewTab.java for example) do get hit. This makes me think that the injection isn't working properly in versions prior to 2023-12 when running from Eclipse.
Try using the latest Eclipse and see if that fixes the problem for you. This might need an issue to be created for it on the JMC Jira.
-------------
PR Comment: https://git.openjdk.org/jmc/pull/548#issuecomment-1989331436
More information about the jmc-dev
mailing list