User: chirino 
  Date: 01/06/26 20:08:21

  Modified:    src/main/org/jboss/util Info.java
  Log:
  I fixed the leaky ThreadGroup problem with the ASF and
  improved the output the listThreadDump function in the Info MBean
  
  Revision  Changes    Path
  1.9       +13 -3     jboss/src/main/org/jboss/util/Info.java
  
  Index: Info.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/util/Info.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Info.java 2001/06/24 00:33:39     1.8
  +++ Info.java 2001/06/27 03:08:21     1.9
  @@ -19,7 +19,7 @@
    *   @author <a href="mailto:[EMAIL PROTECTED]";>Rickard �berg</a>.
    *   @author <a href="mailto:[EMAIL PROTECTED]";>Scott Stark</a>.
    *   @author <a href="mailto:[EMAIL PROTECTED]";>Hiram Chirino</a>.
  - *   @version $Revision: 1.8 $
  + *   @version $Revision: 1.9 $
    */
   public class Info implements InfoMBean, MBeanRegistration {
        // Constants -----------------------------------------------------
  @@ -63,7 +63,7 @@
   
                StringBuffer rc= new StringBuffer();
   
  -             rc.append("<B>");
  +             rc.append("<BR><B>");
                rc.append("Thread Group: " + group.getName());
                rc.append("</B> : ");
                rc.append("max priority:" + group.getMaxPriority() + ", demon:" + 
group.isDaemon());
  @@ -121,7 +121,17 @@
                        root= root.getParent();
                }
   
  -             String rc= getThreadGroupInfo(root);
  +             // I'm not sure why what gets reported is off by +1, 
  +             // but I'm adjusting so that it is consistent with the display
  +             int activeThreads = root.activeCount()-1;
  +             // I'm not sure why what gets reported is off by -1
  +             // but I'm adjusting so that it is consistent with the display
  +             int activeGroups = root.activeGroupCount()+1;
  +             
  +             String rc=
  +                 "<b>Total Threads:</b> "+activeThreads+"<br>"+
  +                 "<b>Total Thread Groups:</b> "+activeGroups+"<br>"+
  +                     getThreadGroupInfo(root) ;
                return rc;
        }
   }
  
  
  

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

Reply via email to