Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-10273

[Jetty] missing jmx object if custom thread pool is used

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.17.3
    • 2.17.4, 2.18.0
    • camel-jetty
    • None

    Description

      If a custom configuration for the ThreadPool is passed, the correspondent JMX object is not published.

      The issue here is that enableJmx(), https://github.com/apache/camel/blob/camel-2.17.3/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java#L314

      that adds the mbeans listeners is called only after setThread https://github.com/apache/camel/blob/camel-2.17.3/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java#L1177 method, so this explains how come the threadpool is not exposed on JMX.

      I've put a simple PR that just adds a check for enableJmx flag at component level, but I wonder if I should make it smarter to take in account possible settings only at Endpoint level or instead if we should remove it the flag per Endpoint altogether.

      Attachments

        Issue Links

          Activity

            People

              davsclaus Claus Ibsen
              paolo.antinori Paolo Antinori
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: