Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-608

JMXConfigurationAction should allow a configurable ObjectName.

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 0.9.9
    • Fix Version/s: 0.9.12
    • Component/s: None
    • Labels:
      None

      Description

      Currently there is no way to customize the ObjectName the MBean is bound to (besides using a ContextSelector - which can be a hassle).

      This is an issue when deploying several applications in the same JVM (read: multiple web-applications in the same servlet engine).

      This patch modifies JMXConfiguratorAction to accept two additional attributes that allow customizing the ObjectName for the MBean:

      <jmxConfigurator/>

      This yields the default ObjectName of "ch.qos.logback.classic:Name=${nameOfContext},Type=ch.qos.logback.classic.jmx.Configurator".

      <jmxConfigurator namespace="foo"/>

      This results in "ch.qos.logback.classic:Name=${nameOfContext},Type=ch.qos.logback.classic.jmx.Configurator,Namespace=foo".

      <jmxConfigurator objectName="logback:name=foo,type=bar"/>

      Which obviously results in "logback:name=foo,type=bar"

      Let me know if I need to adjust the patch in any way.

        Attachments

          Activity

            People

            Assignee:
            ceki Ceki Gülcü
            Reporter:
            andersengstrom Anders Engström
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: