From: David J. <d_j...@us...> - 2002-06-21 19:18:09
|
User: d_jencks Date: 02/06/21 12:18:07 Modified: src/main/org/jboss/system Tag: Branch_3_0 ServiceMBeanSupport.java Log: Synchronized notification id using SynchronizedLong class Revision Changes Path No revision No revision 1.1.2.7 +10 -8 jboss-system/src/main/org/jboss/system/ServiceMBeanSupport.java Index: ServiceMBeanSupport.java =================================================================== RCS file: /cvsroot/jboss/jboss-system/src/main/org/jboss/system/ServiceMBeanSupport.java,v retrieving revision 1.1.2.6 retrieving revision 1.1.2.7 diff -u -r1.1.2.6 -r1.1.2.7 --- ServiceMBeanSupport.java 20 Jun 2002 04:36:50 -0000 1.1.2.6 +++ ServiceMBeanSupport.java 21 Jun 2002 19:18:07 -0000 1.1.2.7 @@ -9,17 +9,19 @@ package org.jboss.system; -import java.util.Date; -import javax.management.NotificationBroadcasterSupport; + +import java.util.Date; import javax.management.AttributeChangeNotification; import javax.management.MBeanRegistration; import javax.management.MBeanServer; -import javax.management.ObjectName; import javax.management.MalformedObjectNameException; +import javax.management.NotificationBroadcasterSupport; +import javax.management.ObjectName; -import org.jboss.logging.Logger; +import EDU.oswego.cs.dl.util.concurrent.SynchronizedLong; import org.apache.log4j.NDC; +import org.jboss.logging.Logger; /** * An abstract base class JBoss services can subclass to implement a @@ -33,7 +35,7 @@ * @author <a href="mailto:Sco...@di...">Scott Stark</a> * @author <a href="mailto:an...@jb...">Andreas Schaefer</a> * @author <a href="mailto:ja...@pl...">Jason Dillon</a> - * @version $Revision: 1.1.2.6 $ + * @version $Revision: 1.1.2.7 $ * * <p><b>Revisions:</b> * @@ -69,8 +71,8 @@ /** The current state this service is in. */ private int state; - /** Indentifier tracker for notifications we send out. */ - private long sequenceNumber = 0; + /** Sequence number for jmx notifications we send out. */ + private SynchronizedLong sequenceNumber = new SynchronizedLong(0); /** * Construct a <t>ServiceMBeanSupport</tt>. @@ -301,7 +303,7 @@ */ protected long getNextNotificationSequenceNumber() { - return sequenceNumber++; + return sequenceNumber.increment(); } |