essobedo opened a new pull request #58: URL: https://github.com/apache/camel-examples/pull/58
## Motivation The `MonkeyHealthCheck` of the example `main-health` is always UP while it is supposed to flip between UP and DOWN. ## Modifications It appears that the code actually tries to get the `MonkeyHealthCheck` instance from `HealthCheckResolver#resolveHealthCheck` which returns a different instance at each call while the correct instance is registered into the `HealthCheckRegistry`. However even if we change the code to get it from the `HealthCheckRegistry`, it doesn't work either because the routes are configured before the loading of the health checks (postProcessCamelContext vs context init). So as workaround, this PR proposes to rely on a static field instead of a member field. * Make the field `MonkeyHealthCheck#up` static * Remove (incorrect) the code used to get the instance of `MonkeyHealthCheck` that will be called by the BeanProcessor -- 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: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org