X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fnetconf%2Fnetconf-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Fimpl%2FDefaultCommitNotificationProducer.java;h=203fdf272584015f40f8bde0dd4e80b753eb51f0;hb=720b039093db2268d6dfeed364e685d34d6c62bf;hp=305fb574243af501f8919211597eeaa9e12a1168;hpb=a92d9d6a21a0f6ca8d2153795721f500eaf29ee9;p=controller.git diff --git a/opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/DefaultCommitNotificationProducer.java b/opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/DefaultCommitNotificationProducer.java index 305fb57424..203fdf2725 100644 --- a/opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/DefaultCommitNotificationProducer.java +++ b/opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/DefaultCommitNotificationProducer.java @@ -15,7 +15,13 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.w3c.dom.Element; -import javax.management.*; +import javax.management.InstanceAlreadyExistsException; +import javax.management.InstanceNotFoundException; +import javax.management.MBeanRegistrationException; +import javax.management.MBeanServer; +import javax.management.NotCompliantMBeanException; +import javax.management.NotificationBroadcasterSupport; +import javax.management.ObjectName; import java.util.Set; public class DefaultCommitNotificationProducer extends NotificationBroadcasterSupport implements @@ -25,10 +31,11 @@ public class DefaultCommitNotificationProducer extends NotificationBroadcasterSu private final MBeanServer mbeanServer; - private final ObjectName on = DefaultCommitOperationMXBean.objectName; + private final ObjectName on = DefaultCommitOperationMXBean.OBJECT_NAME; public DefaultCommitNotificationProducer(MBeanServer mBeanServer) { this.mbeanServer = mBeanServer; + logger.debug("Registering to JMX under {}", on); registerMBean(this, mbeanServer, on); } @@ -36,7 +43,7 @@ public class DefaultCommitNotificationProducer extends NotificationBroadcasterSu try { mbs.registerMBean(instance, on); } catch (InstanceAlreadyExistsException | MBeanRegistrationException | NotCompliantMBeanException e) { - throw new RuntimeException("Unable to register " + instance + " as " + on, e); + throw new IllegalStateException("Unable to register " + instance + " as " + on, e); } }