Giter Site home page Giter Site logo

Comments (4)

philwebb avatar philwebb commented on May 3, 2024 1

I think we might want to do something here, but I'm not sure we should tie things with spring.jmx.enabled since that property is really supposed to turn off Spring specific JXM features.

I wonder if we should wait to see how apache/logging-log4j2#1229 plays out. If Log4J flip the default then we might be able to provide a quick way to turn it back on for users that need it.

from spring-boot.

wilkinsona avatar wilkinsona commented on May 3, 2024

Log4j2 has flipped the default so we can consider an option to flip it back as and when we upgrade to a version with the change. That said, I learned from apache/logging-log4j2#2468 (review) that Log4j 3.0 won't have any JMX support at all so I wonder if this is really worth it. The log4j2.disableJmx=false system property will be available irrespective of what we do here.

from spring-boot.

sdavids avatar sdavids commented on May 3, 2024

I suggest having no code changes but a documentation improvement.


https://docs.spring.io/spring-boot/reference/actuator/jmx.html

Add something along the lines of:

[NOTE]
====
`spring.jmx.enabled` affects only the management beans provided by Spring.

The enablement of management beans provided by other frameworks, e.g. https://logging.apache.org/log4j/2.x/manual/jmx.html[Log4j2], https://www.quartz-scheduler.org/api/2.3.0/constant-values.html#org.quartz.impl.StdSchedulerFactory.PROP_SCHED_JMX_EXPORT[Quartz], or https://docs.jboss.org/hibernate/orm/5.2/userguide/html_single/appendices/Configurations.html#configurations-jmx[Hibernate], is independent.
====

https://docs.spring.io/spring-boot/docs/current/reference/html/application-properties.html#application-properties.core.spring.jmx.enabled

Expose management beans to the JMX domain.

Expose Spring's management beans to the JMX domain.

from spring-boot.

ppkarwasz avatar ppkarwasz commented on May 3, 2024

@wilkinsona,

Log4j2 has flipped the default so we can consider an option to flip it back as and when we upgrade to a version with the change. That said, I learned from apache/logging-log4j2#2468 (review) that Log4j 3.0 won't have any JMX support at all so I wonder if this is really worth it. The log4j2.disableJmx=false system property will be available irrespective of what we do here.

I think it would make sense for a Spring Application to use !spring.jmx.enabled as default value for log4j2.disableJmx regardless of the version of Log4j Core used. Adding the appropriate logic to SpringEnvironmentPropertySource should be enough to accomplish this.

There are not many users that use Log4j JMX, there are probably even less users that enable JMX in Log4j, but not in Spring Boot, so it might even be safe to do it in a patch release.

from spring-boot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.