- } catch (Exception e) {
- LOGGER.error("Error while closing jmx registrator of {}", identifier, e);
+ } catch (final Exception e) {
+ LOG.error("Error while closing jmx registrator of {}", identifier, e);
+ }
+ try {
+ if (runtimeBeanRegistrator != null) {
+ runtimeBeanRegistrator.close();
+ }
+ } catch (final Exception e) {
+ LOG.error("Error while closing runtime bean jmx registrator of {}", identifier, e);