+ throw new IllegalStateException("Cannot register as JMX listener to netconf", e);
+ }
+ }
+
+ @Override
+ public synchronized void close() {
+ // unregister from JMX
+ final ObjectName on = DefaultCommitOperationMXBean.OBJECT_NAME;
+ try {
+ if (mBeanServerConnection.isRegistered(on)) {
+ mBeanServerConnection.removeNotificationListener(on, listener);
+ }
+ } catch (final Exception e) {
+ LOG.warn("Unable to unregister {} as listener for {}", listener, on, e);