tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craig...@apache.org
Subject cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans StandardServerMBean.java
Date Thu, 02 May 2002 17:45:43 GMT
craigmcc    02/05/02 10:45:43

  Modified:    catalina/src/share/org/apache/catalina/mbeans
                        StandardServerMBean.java
  Log:
  When saving server.xml, render <InstanceListener>, <WrapperListener>,
  <WrapperLifecycle>, and <Alias> elements correctly.
  
  Revision  Changes    Path
  1.14      +40 -8     jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/StandardServerMBean.java
  
  Index: StandardServerMBean.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/StandardServerMBean.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- StandardServerMBean.java	2 May 2002 02:03:15 -0000	1.13
  +++ StandardServerMBean.java	2 May 2002 17:45:43 -0000	1.14
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/StandardServerMBean.java,v
1.13 2002/05/02 02:03:15 amyroh Exp $
  - * $Revision: 1.13 $
  - * $Date: 2002/05/02 02:03:15 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/StandardServerMBean.java,v
1.14 2002/05/02 17:45:43 craigmcc Exp $
  + * $Revision: 1.14 $
  + * $Date: 2002/05/02 17:45:43 $
    *
    * ====================================================================
    *
  @@ -113,7 +113,7 @@
    * <code>org.apache.catalina.core.StandardServer</code> component.</p>
    *
    * @author Amy Roh
  - * @version $Revision: 1.13 $ $Date: 2002/05/02 02:03:15 $
  + * @version $Revision: 1.14 $ $Date: 2002/05/02 17:45:43 $
    */
   
   public class StandardServerMBean extends BaseModelMBean {
  @@ -516,7 +516,15 @@
           writer.println(">");
   
           // Store nested <InstanceListener> elements
  -        ; // FIXME
  +        String iListeners[] = context.findInstanceListeners();
  +        for (int i = 0; i < iListeners.length; i++) {
  +            for (int j = 0; j < indent; j++) {
  +                writer.print(' ');
  +            }
  +            writer.print("<InstanceListener>");
  +            writer.print(iListeners[i]);
  +            writer.println("</InstanceListener>");
  +        }
   
           // Store nested <Listener> elements
           if (context instanceof Lifecycle) {
  @@ -663,10 +671,26 @@
           }
   
           // Store nested <WrapperLifecycle> elements
  -        ; // FIXME
  +        String wLifecycles[] = context.findWrapperLifecycles();
  +        for (int i = 0; i < wLifecycles.length; i++) {
  +            for (int j = 0; j < indent; j++) {
  +                writer.print(' ');
  +            }
  +            writer.print("<WrapperLifecycle>");
  +            writer.print(wLifecycles[i]);
  +            writer.println("</WrapperLifecycle>");
  +        }
   
           // Store nested <WrapperListener> elements
  -        ; // FIXME
  +        String wListeners[] = context.findWrapperListeners();
  +        for (int i = 0; i < wListeners.length; i++) {
  +            for (int j = 0; j < indent; j++) {
  +                writer.print(' ');
  +            }
  +            writer.print("<WrapperListener>");
  +            writer.print(wListeners[i]);
  +            writer.println("</WrapperListener>");
  +        }
   
           // Store the ending of this element
           for (int i = 0; i < indent; i++) {
  @@ -910,7 +934,15 @@
           writer.println(">");
   
           // Store nested <Alias> elements
  -        ; // FIXME
  +        String aliases[] = host.findAliases();
  +        for (int i = 0; i < aliases.length; i++) {
  +            for (int j = 0; j < indent; j++) {
  +                writer.print(' ');
  +            }
  +            writer.print("<Alias>");
  +            writer.print(aliases[i]);
  +            writer.println("</Alias>");
  +        }
   
           // Store nested <Cluster> elements
           ; // FIXME
  
  
  

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message