User: juhalindfors
  Date: 02/03/19 13:16:31

  Modified:    src/main/org/jboss/mx/modelmbean ModelBase.java
  Log:
  fixed attr change notifications to fetch attr type from mmbinfo, and set
  the values correctly in the notif (not wrapped as Attributes)
  
  Revision  Changes    Path
  1.9       +5 -5      jmx/src/main/org/jboss/mx/modelmbean/ModelBase.java
  
  Index: ModelBase.java
  ===================================================================
  RCS file: /cvsroot/jboss/jmx/src/main/org/jboss/mx/modelmbean/ModelBase.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ModelBase.java    8 Mar 2002 00:41:37 -0000       1.8
  +++ ModelBase.java    19 Mar 2002 21:16:31 -0000      1.9
  @@ -51,7 +51,7 @@
    * @see org.jboss.mx.modelmbean.ModelMBeanConstants
    *
    * @author  <a href="mailto:[EMAIL PROTECTED]";>Juha Lindfors</a>.
  - * @version $Revision: 1.8 $
  + * @version $Revision: 1.9 $
    */
   public abstract class ModelBase
      extends MBeanInvoker
  @@ -171,7 +171,7 @@
      throws MBeanException
      {
         String attr = oldValue.getName();
  -      String type = oldValue.getClass().getName();
  +      String type = ((ModelMBeanInfo)info).getAttribute(attr).getType();
   
         AttributeChangeNotification notif = new AttributeChangeNotification(
                                                this,                          // 
source
  @@ -179,7 +179,8 @@
                                                System.currentTimeMillis(),    // time 
stamp
                                                "" + attr + " changed from " + 
oldValue + " to " + newValue,
                                                attr, type,                    // name 
& type
  -                                             oldValue, newValue             // 
values
  +                                             oldValue.getValue(),
  +                                             newValue.getValue()            // 
values
                                             );
   
         notifier.sendNotification(notif);
  @@ -213,9 +214,8 @@
   
         ModelMBeanInfoSupport infoSupport = (ModelMBeanInfoSupport) info;
         this.stack = new PersistenceInterceptor(server, this, 
infoSupport.getDescriptors(ALL_DESCRIPTORS));
  -      this.stack.insertLast(new MBeanAttributeInterceptor(infoSupport));
  +      this.stack.insertLast(new MBeanAttributeInterceptor(infoSupport, this));
         this.stack.insertLast(new ObjectReferenceInterceptor(resource, infoSupport));
  -//      this.stack.insertLast(new ModelMBeanInterceptor(resource, infoSupport));
   
         return name;
      }
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to