You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by "dashorst (via GitHub)" <gi...@apache.org> on 2026/10/12 13:11:53 UTC

[I] WicketMetricsSettings.stopJmxReporter() stops a new reporter instead of the running one [wicket]

dashorst opened a new issue, #1662:
URL: https://github.com/apache/wicket/issues/1662

   In wicket-metrics, `WicketMetricsSettings` has
   
   ```java
   public void startJmxReporter()
   {
   	MetricRegistry metricRegistry = WicketMetrics.getMetricRegistry();
   	JmxReporter.forRegistry(metricRegistry).build().start();
   }
   
   public void stopJmxReporter()
   {
   	MetricRegistry metricRegistry = WicketMetrics.getMetricRegistry();
   	JmxReporter.forRegistry(metricRegistry).build().stop();
   }
   ```
   
   `stopJmxReporter()` builds a new reporter and stops that one. The reporter started by `startJmxReporter()` is never stopped, so its MBeans stay registered, for example after the application is undeployed.
   
   Proposed fix: keep the reporter created in `startJmxReporter()` in a field and stop that instance in `stopJmxReporter()`.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@wicket.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org