-
Feature Request
-
Resolution: Done
-
Major
-
JBossAS-4.0.3RC2
-
None
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().