User: d_jencks
  Date: 02/02/21 23:02:53

  Modified:    src/main/org/jboss/monitor BeanCacheMonitor.java
  Log:
  Fixed compilation problems from previous refactoring.  JNDIView list works, but 
JNDIView list and BeanCacheMonitor do not work: I will fix them shortly
  
  Revision  Changes    Path
  1.8       +14 -6     jboss/src/main/org/jboss/monitor/BeanCacheMonitor.java
  
  Index: BeanCacheMonitor.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/monitor/BeanCacheMonitor.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- BeanCacheMonitor.java     15 Feb 2002 00:46:54 -0000      1.7
  +++ BeanCacheMonitor.java     22 Feb 2002 07:02:53 -0000      1.8
  @@ -19,7 +19,7 @@
   
   import org.jboss.ejb.EJBDeployer;
   import org.jboss.ejb.EJBDeployerMBean;
  -import org.jboss.ejb.Application;
  +import org.jboss.ejb.EjbModule;
   import org.jboss.ejb.InstanceCache;
   import org.jboss.ejb.Container;
   import org.jboss.ejb.EntityContainer;
  @@ -31,7 +31,7 @@
    *
    * @see Monitorable
    * @author <a href="mailto:[EMAIL PROTECTED]";>Simone Bordet</a>
  - * @version $Revision: 1.7 $
  + * @version $Revision: 1.8 $
    */
   public class BeanCacheMonitor
      implements BeanCacheMonitorMBean, MBeanRegistration
  @@ -65,13 +65,20 @@
      {}
      
      // CacheMonitorMBean implementation -----------------------------------
  +   /**
  +    * Describe <code>getSnapshots</code> method here.
  +    *
  +    * @return a <code>BeanCacheSnapshot[]</code> value
  +    * @todo: convert to queries on object names of components.
  +    */
      public BeanCacheSnapshot[] getSnapshots()
      {
  -      Iterator applications = null;
  +      Iterator ejbModules = null;
         // Get map of deployed applications
         try
         {
  -         applications = 
(Iterator)m_mbeanServer.invoke(EJBDeployerMBean.OBJECT_NAME, 
"getDeployedApplications", new Object[]
  +         //This should be a query over object names for the containers.
  +         ejbModules = (Iterator)m_mbeanServer.invoke(EJBDeployerMBean.OBJECT_NAME, 
"getDeployedApplications", new Object[]
            {}, new String[]
            {});
         }
  @@ -84,12 +91,13 @@
         ArrayList cacheSnapshots = new ArrayList();
         
         // For each application, getContainers()
  -      while (applications.hasNext())
  +      while (ejbModules.hasNext())
         {
  -         Application app = (Application)applications.next();
  +         EjbModule app = (EjbModule)ejbModules.next();
            String name = app.getName();
            
            // Loop on each container of the application
  +         //Since we are just totaling everything, do a query on container object 
names.
            for (Iterator containers = app.getContainers().iterator(); 
containers.hasNext();)
            {
               // Get the cache for each container
  
  
  

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

Reply via email to