Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-2216

Move sequenceNumber from ServiceMBeanSupport to JBossNotificationBroadcasterSupport

XMLWordPrintable

      In order to let a service pass on the jmx notification broadcasting capability to other classes, we need to provide those classes with access to the notification sequence number, currently stored in ServiceMBeanSupport, accessible through

      /** Sequence number for jmx notifications we send out. */
      private SynchronizedLong sequenceNumber = new SynchronizedLong(0);

      protected long getNextNotificationSequenceNumber()
      {
      return sequenceNumber.increment();
      }

      A simple solution is to move sequenceNumber from ServiceMBeanSupport to JBossNotificationBroadcasterSupport that already provides the sendNotification(..) capability and add a method to provide the next sequence number.

      public long JBossNotificationBroadcasterSupport.nextNotificationSequenceNumber()

      To retain compatibility protected ServiceMBeanSupport.getNextNotificationSequenceNumber() will just delegate to JBossNotificationBroadcasterSupport.nextNotificationSequenceNumber().

              dandread1@redhat.com Dimitrios Andreadis
              dandread1@redhat.com Dimitrios Andreadis
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: