[jboss-cvs] JBossCache/src/org/jboss/cache/jmx ...

Brian Stansberry brian.stansberry at jboss.com
Thu Nov 16 16:14:42 EST 2006


  User: bstansberry
  Date: 06/11/16 16:14:42

  Modified:    src/org/jboss/cache/jmx    Cache.java CacheJmxWrapper.java
                        CacheMBean.java
  Log:
  Fix the differently broken JMX crapola
  
  Revision  Changes    Path
  1.5       +2 -1      JBossCache/src/org/jboss/cache/jmx/Cache.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Cache.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/jmx/Cache.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -b -r1.4 -r1.5
  --- Cache.java	16 Nov 2006 14:14:11 -0000	1.4
  +++ Cache.java	16 Nov 2006 21:14:42 -0000	1.5
  @@ -6,6 +6,7 @@
   import org.jboss.cache.interceptors.Interceptor;
   import org.jboss.cache.config.Configuration;
   
  +import javax.management.NotificationBroadcaster;
   import javax.management.NotificationListener;
   import javax.management.NotificationFilter;
   import javax.management.ListenerNotFoundException;
  @@ -16,7 +17,7 @@
    *
    * @author <a href="mailto:manik at jboss.org">Manik Surtani</a>
    */
  -public class Cache implements CacheMBean
  +public class Cache implements CacheMBean, NotificationBroadcaster
   {
      TreeCacheProxyImpl tcpi;
   
  
  
  
  1.8       +27 -24    JBossCache/src/org/jboss/cache/jmx/CacheJmxWrapper.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: CacheJmxWrapper.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/jmx/CacheJmxWrapper.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -b -r1.7 -r1.8
  --- CacheJmxWrapper.java	16 Nov 2006 14:14:11 -0000	1.7
  +++ CacheJmxWrapper.java	16 Nov 2006 21:14:42 -0000	1.8
  @@ -36,11 +36,13 @@
   import javax.management.MBeanRegistration;
   import javax.management.MBeanServer;
   import javax.management.MalformedObjectNameException;
  +import javax.management.NotificationBroadcaster;
   import javax.management.NotificationFilter;
   import javax.management.NotificationListener;
   import javax.management.ObjectName;
   
  -public class CacheJmxWrapper implements CacheJmxWrapperMBean, MBeanRegistration
  +public class CacheJmxWrapper 
  +   implements CacheJmxWrapperMBean, MBeanRegistration
   {
      private Log log = LogFactory.getLog(getClass().getName());
      
  @@ -290,27 +292,28 @@
         }
      }
   
  -   public void addNotificationListener(NotificationListener notificationListener, NotificationFilter notificationFilter, Object object) throws IllegalArgumentException
  -   {
  -      getCacheMgmtInterceptor().addNotificationListener(notificationListener, notificationFilter, object);
  -   }
  -
  -   public void removeNotificationListener(NotificationListener notificationListener) throws ListenerNotFoundException
  -   {
  -      getCacheMgmtInterceptor().removeNotificationListener(notificationListener);
  -   }
  -
  -   public MBeanNotificationInfo[] getNotificationInfo()
  -   {
  -      return getCacheMgmtInterceptor().getNotificationInfo();
  -   }
  -
  -   private CacheMgmtInterceptor getCacheMgmtInterceptor()
  -   {
  -      for (Interceptor i : tcpi.treeCache.getInterceptors())
  -      {
  -         if (i instanceof CacheMgmtInterceptor) return (CacheMgmtInterceptor) i;
  -      }
  -      throw new RuntimeException("Cache management interceptor not found");
  -   }
  +   // Disable NotificationBroadcaster for now
  +//   public void addNotificationListener(NotificationListener notificationListener, NotificationFilter notificationFilter, Object object) throws IllegalArgumentException
  +//   {
  +//      getCacheMgmtInterceptor().addNotificationListener(notificationListener, notificationFilter, object);
  +//   }
  +//
  +//   public void removeNotificationListener(NotificationListener notificationListener) throws ListenerNotFoundException
  +//   {
  +//      getCacheMgmtInterceptor().removeNotificationListener(notificationListener);
  +//   }
  +//
  +//   public MBeanNotificationInfo[] getNotificationInfo()
  +//   {
  +//      return getCacheMgmtInterceptor().getNotificationInfo();
  +//   }
  +//
  +//   private CacheMgmtInterceptor getCacheMgmtInterceptor()
  +//   {
  +//      for (Interceptor i : tcpi.treeCache.getInterceptors())
  +//      {
  +//         if (i instanceof CacheMgmtInterceptor) return (CacheMgmtInterceptor) i;
  +//      }
  +//      throw new RuntimeException("Cache management interceptor not found");
  +//   }
   }
  
  
  
  1.7       +1 -1      JBossCache/src/org/jboss/cache/jmx/CacheMBean.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: CacheMBean.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/jmx/CacheMBean.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -b -r1.6 -r1.7
  --- CacheMBean.java	16 Nov 2006 14:14:11 -0000	1.6
  +++ CacheMBean.java	16 Nov 2006 21:14:42 -0000	1.7
  @@ -16,7 +16,7 @@
    *
    * @author <a href="mailto:manik at jboss.org">Manik Surtani (manik at jboss.org)</a>
    */
  -public interface CacheMBean extends LifeCycle, NotificationBroadcaster
  +public interface CacheMBean extends LifeCycle
   {
      /**
       * Retrieves a reference to the underlying {@link Cache}
  
  
  



More information about the jboss-cvs-commits mailing list