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

Issue #4830 - Enabling JMX on jetty-slf4j-impl #4831

Closed

Conversation

joakime
Copy link
Contributor

@joakime joakime commented Apr 30, 2020

Signed-off-by: Joakim Erdfelt joakim.erdfelt@gmail.com

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
@joakime joakime requested a review from sbordet April 30, 2020 19:52
@joakime joakime self-assigned this Apr 30, 2020
@joakime joakime linked an issue Apr 30, 2020 that may be closed by this pull request
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
@joakime joakime marked this pull request as ready for review May 1, 2020 14:18
@sbordet
Copy link
Contributor

sbordet commented May 2, 2020

@joakime upon further analysis, I think we can do better.

The original problem that led to this solution was that we thought there was no way to access the JettyLoggerFactory, but there actually is a way via standard SLF4J APIs: LoggerFactory.getILoggerFactory().

This means that, like we used to do in 9.4.x, we can do server.addBean(LoggerFactory.getILoggerFactory()) and have the JettyLoggerFactory be part of the component tree and therefore known to MBeanContainer.

What we get wrong is the JMX metadata, since JettyLoggerFactory cannot use the Jetty JMX support.
We should expand the JMX metadata discovery so that it's able to figure out standard JMX mbeans.

With that in place, we don't need to support org.eclipse.jetty.jmx=true since that will be decided by applications (by doing server.addBean(LoggerFactory.getILoggerFactory())) but we still want to support the context property.

I can give it a go, unless you want to.

@sbordet
Copy link
Contributor

sbordet commented May 3, 2020

@joakime see #4839

@joakime
Copy link
Contributor Author

joakime commented May 7, 2020

Closing in favor of #4839

@joakime joakime closed this May 7, 2020
@joakime joakime deleted the jetty-10.0.x-4830-jetty-slf4j-impl-with-jmx branch May 21, 2020 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add JMX to new Jetty 10 jetty-slf4j-impl
2 participants