cq5-healthcheck
cq5-healthcheck copied to clipboard
Handle gracefully situations when MBeans are not available
In many cases we have situations where 2 different processes interfere:
- Instantiation of the MBeanStatusProvider based on the config nodes
- Startup of the jmx-extension bundle.
In case the config is handled first, it requires MBeans which are not there yet, resulting in errors and there's no recovery possible.
Therefor I will modify the MBeanStatusProvider like this:
- The creation of the connection to the MBean will be moved off the activator.
- on every call of getStatus() all check for the availability of the mbean will be triggered. If the MBean is not available, it will return "UNKNOWN".