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

Details

    • 0
    • 0% 0%

    Description

      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().

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: