+ @Override
+ public synchronized void close() {
+ // unregister from JMX
+ ObjectName on = DefaultCommitOperationMXBean.OBJECT_NAME;
+ try {
+ if (mBeanServerConnection.isRegistered(on)) {
+ mBeanServerConnection.removeNotificationListener(on, listener);
+ }
+ } catch (Exception e) {
+ logger.warn("Unable to unregister {} as listener for {}", listener, on, e);
+ }
+ }
+}
+
+class ConfigPersisterNotificationListener implements NotificationListener {
+ private static final Logger logger = LoggerFactory.getLogger(ConfigPersisterNotificationListener.class);
+
+ private final Persister persisterAggregator;
+
+ ConfigPersisterNotificationListener(Persister persisterAggregator) {
+ this.persisterAggregator = persisterAggregator;
+ }
+