tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@locus.apache.org
Subject cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/util XMLWriter.java
Date Sat, 30 Sep 2000 22:35:24 GMT
remm        00/09/30 15:35:24

  Modified:    .        build.bat build.sh
               catalina README build.bat build.sh build.xml
               catalina/src/share/org/apache/catalina/util XMLWriter.java
  Added:       catalina/src/share/org/apache/catalina/startup
                        CatalinaManager.java CatalinaManagerMBean.java
  Log:
  - Added a simple JMX wrapper around Catalina. Another one is coming to
    wrap the Embedded class. It will be more powerful, but harder to use.
  - You now need JMX installed and a JMX_HOME env variable to build
    Tomcat 4.
  - Updated the script files to reflect this.
  - Fix a small bug in the XML printer used by Catalina DAV servlet.
  
  Revision  Changes    Path
  1.7       +10 -3     jakarta-tomcat-4.0/build.bat
  
  Index: build.bat
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/build.bat,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- build.bat	2000/09/22 13:57:32	1.6
  +++ build.bat	2000/09/30 22:35:22	1.7
  @@ -15,12 +15,14 @@
   rem
   rem   JSSE_HOME        Must point at your JSSE installation [REQUIRED]
   rem
  +rem   JMX_HOME         Must point at your JMX installation [REQUIRED]
  +rem
   rem   REGEXP_HOME      Must point at your Regexp installation [REQUIRED]
   rem
   rem   SERVLETAPI_HOME  Must point at your "jakarta-servletapi" installation.
   rem                    [REQUIRED]
   rem
  -rem $Id: build.bat,v 1.6 2000/09/22 13:57:32 pierred Exp $
  +rem $Id: build.bat,v 1.7 2000/09/30 22:35:22 remm Exp $
   rem ---------------------------------------------------------------------------
   
   
  @@ -47,6 +49,11 @@
   goto cleanup
   :gotJsseHome
   
  +if not "%JMX_HOME%" == "" goto gotJmxHome
  +echo You must set JMX_HOME to point at your Java Management Extensions install
  +goto cleanup
  +:gotJmxHome
  +
   if not "%ANT_HOME%" == "" goto gotAntHome
   set ANT_HOME=../jakarta-ant
   :gotAntHome
  @@ -65,12 +72,12 @@
   rem ----- Set Up The Runtime Classpath ----------------------------------------
   
   if not "%CLASSPATH%" == "" set CLASSPATH=%CLASSPATH%;
  -set CLASSPATH=%CLASSPATH%;%ANT_HOME%\lib\ant.jar;%JAVA_HOME%\lib\tools.jar;%XERCES_HOME%\xerces.jar
  +set CLASSPATH=%CLASSPATH%;%ANT_HOME%\lib\ant.jar;%JAVA_HOME%\lib\tools.jar;%XERCES_HOME%\xerces.jar;%JMX_HOME%\lib\jmxri.jar
   
   
   rem ----- Execute The Requested Build -----------------------------------------
   
  -java %ANT_OPTS% org.apache.tools.ant.Main -Dant.home="%ANT_HOME%" -Dxerces.home="%XERCES_HOME%"
-Djsse.home="%JSSE_HOME%" -Dregexp.home="%REGEXP_HOME%" -Dservletapi.home="%SERVLETAPI_HOME%"
-Djava.home="%JAVA_HOME%" %1 %2 %3 %4 %5 %6 %7 %8 %9
  +java %ANT_OPTS% org.apache.tools.ant.Main -Dant.home="%ANT_HOME%" -Dxerces.home="%XERCES_HOME%"
-Djsse.home="%JSSE_HOME%" -Djmx.home="%JMX_HOME%" -Dregexp.home="%REGEXP_HOME%" -Dservletapi.home="%SERVLETAPI_HOME%"
-Djava.home="%JAVA_HOME%" %1 %2 %3 %4 %5 %6 %7 %8 %9
   
   
   rem ----- Restore Environment Variables ---------------------------------------
  
  
  
  1.7       +10 -3     jakarta-tomcat-4.0/build.sh
  
  Index: build.sh
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/build.sh,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- build.sh	2000/09/22 13:57:33	1.6
  +++ build.sh	2000/09/30 22:35:22	1.7
  @@ -15,13 +15,15 @@
   #
   #   JSSE_HOME        Must point at your JSSE installation [REQUIRED]
   #
  +#   JMX_HOME         Must point at your JMX installation [REQUIRED]
  +#
   #   REGEXP_HOME      Must point at your "jakarta-regexp" installation
   #                    [../jakarta-regexp]
   #
   #   SERVLETAPI_HOME  Must point at your "jakarta-servletapi" installation.
   #                    [../jakarta-servletapi]
   #
  -# $Id: build.sh,v 1.6 2000/09/22 13:57:33 pierred Exp $
  +# $Id: build.sh,v 1.7 2000/09/30 22:35:22 remm Exp $
   # -----------------------------------------------------------------------------
   
   
  @@ -50,6 +52,11 @@
     exit 1
   fi
   
  +if [ "$JMX_HOME" = "" ] ; then
  +  echo You must set JMX_HOME to point at your Java Management Extensions install
  +  exit 1
  +fi
  +
   if [ "$REGEXP_HOME" = "" ] ; then
     echo You must set REGEXP_HOME to point at your Regular Expressions distribution install
     exit 1
  @@ -63,7 +70,7 @@
   
   # ----- Set Up The Runtime Classpath ------------------------------------------
   
  -CP=$ANT_HOME/lib/ant.jar:$JAVA_HOME/lib/tools.jar:$XERCES_HOME/xerces.jar
  +CP=$ANT_HOME/lib/ant.jar:$JAVA_HOME/lib/tools.jar:$XERCES_HOME/xerces.jar:$JMX_HOME/lib/jmxri.jar
   
   if [ "$CLASSPATH" != "" ] ; then
     CP=$CLASSPATH:$CP
  @@ -72,4 +79,4 @@
   
   # ----- Execute The Requested Build -------------------------------------------
   
  -java $ANT_OPTS -classpath $CP org.apache.tools.ant.Main -Dant.home=$ANT_HOME -Dxerces.home=$XERCES_HOME
-Djsse.home=$JSSE_HOME -Dregexp.home=$REGEXP_HOME -Dservletapi.home=$SERVLETAPI_HOME -Djava.home=$JAVA_HOME
"$@"
  +java $ANT_OPTS -classpath $CP org.apache.tools.ant.Main -Dant.home=$ANT_HOME -Dxerces.home=$XERCES_HOME
-Djsse.home=$JSSE_HOME -Djmx.home=$JMX_HOME -Dregexp.home=$REGEXP_HOME -Dservletapi.home=$SERVLETAPI_HOME
-Djava.home=$JAVA_HOME "$@"
  
  
  
  1.2       +6 -0      jakarta-tomcat-4.0/catalina/README
  
  Index: README
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/README,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- README	2000/08/17 02:47:40	1.1
  +++ README	2000/09/30 22:35:23	1.2
  @@ -37,6 +37,12 @@
     Set an environment variable "JSSE_HOME" pointing at the directory to which
     you installed this distribution.
   
  +* Download and install the Java Management Extension (JMX) implementation
  +  (current version number is 1.0) from 
  +  <http://java.sun.com/products/JavaManagement/index.html>.
  +  Set an environment variable "JMX_HOME" pointing at the directory to which
  +  you installed this distribution.
  +
   * Download and install the Ant distribution (subproject "jakarta-ant") into
     a directory named "$JAKARTA_HOME/jakarta-ant".  If you have downloaded the
     source distribution, you will need to build the executable version by
  
  
  
  1.8       +10 -3     jakarta-tomcat-4.0/catalina/build.bat
  
  Index: build.bat
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/build.bat,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- build.bat	2000/09/20 19:55:01	1.7
  +++ build.bat	2000/09/30 22:35:23	1.8
  @@ -15,12 +15,14 @@
   rem
   rem   JSSE_HOME        Must point at your JSSE installation [REQUIRED]
   rem
  +rem   JMX_HOME         Must point at your JMX installation [REQUIRED]
  +rem
   rem   REGEXP_HOME      Must point at your Regexp installation [REQUIRED]
   rem
   rem   SERVLETAPI_HOME  Must point at your "jakarta-servletapi" installation.
   rem                    [REQUIRED]
   rem
  -rem $Id: build.bat,v 1.7 2000/09/20 19:55:01 pierred Exp $
  +rem $Id: build.bat,v 1.8 2000/09/30 22:35:23 remm Exp $
   rem ---------------------------------------------------------------------------
   
   
  @@ -47,6 +49,11 @@
   goto cleanup
   :gotJsseHome
   
  +if not "%JMX_HOME%" == "" goto gotJmxHome
  +echo You must set JMX_HOME to point at your Java Management Extensions install
  +goto cleanup
  +:gotJmxHome
  +
   if not "%ANT_HOME%" == "" goto gotAntHome
   set ANT_HOME=../../jakarta-ant
   :gotAntHome
  @@ -65,12 +72,12 @@
   rem ----- Set Up The Runtime Classpath ----------------------------------------
   
   if not "%CLASSPATH%" == "" set CLASSPATH=%CLASSPATH%;
  -set CLASSPATH=%CLASSPATH%;%ANT_HOME%\lib\ant.jar;%JAVA_HOME%\lib\tools.jar;%XERCES_HOME%\xerces.jar
  +set CLASSPATH=%CLASSPATH%;%ANT_HOME%\lib\ant.jar;%JAVA_HOME%\lib\tools.jar;%XERCES_HOME%\xerces.jar;%JMX_HOME%\lib\jmxri.jar
   
   
   rem ----- Execute The Requested Build -----------------------------------------
   
  -%JAVA_HOME%\bin\java %ANT_OPTS% org.apache.tools.ant.Main -Dant.home=%ANT_HOME% -Dxerces.home="%XERCES_HOME%"
-Djsse.home=%JSSE_HOME% -Dregexp.home=%REGEXP_HOME% -Dservletapi.home=%SERVLETAPI_HOME% %1
%2 %3 %4 %5 %6 %7 %8 %9
  +%JAVA_HOME%\bin\java %ANT_OPTS% org.apache.tools.ant.Main -Dant.home=%ANT_HOME% -Dxerces.home="%XERCES_HOME%"
-Djsse.home=%JSSE_HOME% -Djmx.home=%JMX_HOME% -Dregexp.home=%REGEXP_HOME% -Dservletapi.home=%SERVLETAPI_HOME%
%1 %2 %3 %4 %5 %6 %7 %8 %9
   
   
   rem ----- Restore Environment Variables ---------------------------------------
  
  
  
  1.6       +10 -3     jakarta-tomcat-4.0/catalina/build.sh
  
  Index: build.sh
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/build.sh,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- build.sh	2000/09/20 19:55:02	1.5
  +++ build.sh	2000/09/30 22:35:23	1.6
  @@ -15,13 +15,15 @@
   #
   #   JSSE_HOME        Must point at your JSSE installation [REQUIRED]
   #
  +#   JMX_HOME         Must point at your JMX installation [REQUIRED]
  +#
   #   REGEXP_HOME      Must point at your Regexp installation
   #                    [../../jakarta-regexp]
   #
   #   SERVLETAPI_HOME  Must point at your "jakarta-servletapi" installation.
   #                    [../../jakarta-servletapi]
   #
  -# $Id: build.sh,v 1.5 2000/09/20 19:55:02 pierred Exp $
  +# $Id: build.sh,v 1.6 2000/09/30 22:35:23 remm Exp $
   # -----------------------------------------------------------------------------
   
   
  @@ -50,6 +52,11 @@
     exit 1
   fi
   
  +if [ "$JMX_HOME" = "" ] ; then
  +  echo You must set JMX_HOME to point at your Java Management Extensions install
  +  exit 1
  +fi
  +
   if [ "$REGEXP_HOME" = "" ] ; then
     echo You must set REGEXP_HOME to point at your Regular Expressions distribution install
     exit 1
  @@ -63,7 +70,7 @@
   
   # ----- Set Up The Runtime Classpath ------------------------------------------
   
  -CP=$ANT_HOME/lib/ant.jar:$JAVA_HOME/lib/tools.jar:$XERCES_HOME\xerces.jar
  +CP=$ANT_HOME/lib/ant.jar:$JAVA_HOME/lib/tools.jar:$XERCES_HOME\xerces.jar:$JMX_HOME/lib/jmxri.jar
   if [ "$CLASSPATH" != "" ] ; then
     CP=$CLASSPATH:$CP
   fi
  @@ -71,5 +78,5 @@
   
   # ----- Execute The Requested Build -------------------------------------------
   
  -java $ANT_OPTS -classpath $CP org.apache.tools.ant.Main -Dant.home=$ANT_HOME -Dxerces.home=$XERCES_HOME
-Djsse.home=$JSSE_HOME -Dregexp.home=$REGEXP_HOME -Dservletapi.home=$SERVLETAPI_HOME "$@"
  +java $ANT_OPTS -classpath $CP org.apache.tools.ant.Main -Dant.home=$ANT_HOME -Dxerces.home=$XERCES_HOME
-Djsse.home=$JSSE_HOME -Djmx.home=$JMX_HOME -Dregexp.home=$REGEXP_HOME -Dservletapi.home=$SERVLETAPI_HOME
"$@"
   
  
  
  
  1.17      +4 -2      jakarta-tomcat-4.0/catalina/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/build.xml,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- build.xml	2000/09/30 19:15:41	1.16
  +++ build.xml	2000/09/30 22:35:23	1.17
  @@ -9,6 +9,7 @@
     <property name="catalina.dist"   value="../../dist/catalina"/>
     <property name="xerces.home"     value="${basedir}/../xerces"/>
     <property name="jsse.home"       value="../../jsse"/>
  +  <property name="jmx.home"        value="../../jmx"/>
     <property name="regexp.home"     value="../../jakarta-regexp"/>
     <property name="servletapi.home" value="../../jakarta-servletapi"/>
   
  @@ -18,6 +19,7 @@
     <property name="jcert.jar"       value="${jsse.home}/lib/jcert.jar"/>
     <property name="jnet.jar"        value="${jsse.home}/lib/jnet.jar"/>
     <property name="jsse.jar"        value="${jsse.home}/lib/jsse.jar"/>
  +  <property name="jmxri.jar"       value="${jmx.home}/lib/jmxri.jar"/>
     <property name="regexp.jar"      value="${regexp.home}/jakarta-regexp-1.1.jar"/>
     <property name="servlet.jar"     value="${servletapi.home}/lib/servlet.jar"/>
   
  @@ -69,7 +71,7 @@
   
       <!-- Compile internal server components -->
       <javac   srcdir="src/share" destdir="${catalina.build}/classes"
  -             classpath="${xerces.jar}:${regexp.jar}:${servlet.jar}:${jcert.jar}:${jnet.jar}:${jsse.jar}"
  +             classpath="${xerces.jar}:${regexp.jar}:${servlet.jar}:${jcert.jar}:${jnet.jar}:${jsse.jar}:${jmxri.jar}"
                deprecation="off" debug="on" optimize="off" target="1.2"
                excludes="**/CVS/**"/>
   
  @@ -90,7 +92,7 @@
       <deltree dir="${catalina.build}/javadoc"/>
       <mkdir dir="${catalina.build}/javadoc"/>
       <javadoc packagenames="org.apache.catalina.*"
  -             classpath="${xerces.jar}:${jcert.jar}:${jsse.jar}:${jnet.jar}:${regexp.jar}:${servlet.jar}:${catalina.build}/classes"
  +             classpath="${xerces.jar}:${jcert.jar}:${jsse.jar}:${jnet.jar}:${regexp.jar}:${jmxri.jar}:${servlet.jar}:${catalina.build}/classes"
                  sourcepath="src/share"
                     destdir="${catalina.build}/javadoc"
                      author="true"
  
  
  
  1.1                  jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/CatalinaManager.java
  
  Index: CatalinaManager.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/CatalinaManager.java,v
1.1 2000/09/30 22:35:24 remm Exp $
   * $Revision: 1.1 $
   * $Date: 2000/09/30 22:35:24 $
   *
   * ====================================================================
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *    any, must include the following acknowlegement:  
   *       "This product includes software developed by the 
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
   *    Foundation" must not be used to endorse or promote products derived
   *    from this software without prior written permission. For written 
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   * [Additional notices, if required by prior licensing conditions]
   *
   */ 
  
  package org.apache.catalina.startup;
  
  import javax.management.NotificationBroadcasterSupport;
  import javax.management.ObjectName;
  import javax.management.MBeanServer;
  import javax.management.MBeanRegistration;
  import javax.management.AttributeChangeNotification;
  import javax.management.Notification;
  
  /**
   * Implementation of the Catalina JMX MBean as a wrapper of the Catalina class.
   * 
   * @author <a href="mailto:remm@apache.org">Remy Maucherat</a>
   * @version $Revision: 1.1 $
   */
  
  public final class CatalinaManager
      extends NotificationBroadcasterSupport
      implements CatalinaManagerMBean, MBeanRegistration {
      
      
      // ----------------------------------------------------- Instance Variables
      
      
      /**
       * Status of the Slide domain.
       */
      private int state = STOPPED;
      
      
      /**
       * Notification sequence number.
       */
      private long sequenceNumber = 0;
      
      
      /**
       * Catalina wrapper.
       */
      private CatalinaWrapper catalina = new CatalinaWrapper();
      
      
      // ---------------------------------------------- MBeanRegistration Methods
      
      
      public ObjectName preRegister(MBeanServer server, ObjectName name)
          throws Exception {
          return new ObjectName(OBJECT_NAME);
      }
      
      
      public void postRegister(Boolean registrationDone) {
          if (!registrationDone.booleanValue())
              destroy();
      }
      
      
      public void preDeregister()
          throws Exception {
      }
      
      
      public void postDeregister() {
          destroy();
      }
      
      
      // ----------------------------------------------------- SlideMBean Methods
      
      
      /**
       * Retruns the Catalina component name.
       */
      public String getName() {
          return NAME;
      }
      
      
      /**
       * Returns the state.
       */
      public int getState() {
          return state;
      }
      
      
      /**
       * Returns a String representation of the state.
       */
      public String getStateString() {
          return states[state];
      }
      
      
      /**
       * Config file path accessor.
       */
      public String getConfigFile() {
          return catalina.getConfigFile();
      }
      
      
      /**
       * Config file path mutator.
       */
      public void setConfigFile(String configFile) {
          catalina.setConfigFile(configFile);
      }
      
      
      /**
       * Start the servlet container.
       */
      public void start()
          throws Exception {
          
          Notification notification = null;
          
          if (state != STOPPED)
              return;
          
          state = STARTING;
          
          // Notifying the MBEan server that we're starting
          
          notification = new AttributeChangeNotification
              (this, sequenceNumber++, System.currentTimeMillis(), 
               "Starting " + NAME, "State", "java.lang.Integer", 
               new Integer(STOPPED), new Integer(STARTING));
          sendNotification(notification);
          
          try {
              
              catalina.start();
              
          } catch (Throwable t) {
              state = STOPPED;
              notification = new AttributeChangeNotification
                  (this, sequenceNumber++, System.currentTimeMillis(), 
                   "Stopped " + NAME, "State", "java.lang.Integer", 
                   new Integer(STARTING), new Integer(STOPPED));
              sendNotification(notification);
          }
          
          state = STARTED;
          notification = new AttributeChangeNotification
              (this, sequenceNumber++, System.currentTimeMillis(), 
               "Started " + NAME, "State", "java.lang.Integer", 
               new Integer(STARTING), new Integer(STARTED));
          sendNotification(notification);
          
      }
      
      
      /**
       * Stop the servlet container.
       */
      public void stop() {
          
          Notification notification = null;
          
          if (state != STARTED)
              return;
          
          state = STOPPING;
          
          notification = new AttributeChangeNotification
              (this, sequenceNumber++, System.currentTimeMillis(), 
               "Stopping " + NAME, "State", "java.lang.Integer", 
               new Integer(STARTED), new Integer(STOPPING));
          sendNotification(notification);
          
          try {
              
              catalina.stop();
              
          } catch (Throwable t) {
              
              // FIXME
              t.printStackTrace();
              
          }
          
          state = STOPPED;
          
          notification = new AttributeChangeNotification
              (this, sequenceNumber++, System.currentTimeMillis(), 
               "Stopped " + NAME, "State", "java.lang.Integer", 
               new Integer(STOPPING), new Integer(STOPPED));
          sendNotification(notification);
          
      }
      
      
      /**
       * Destroy servlet container (if any is running).
       */
      public void destroy() {
          
          if (getState() != STOPPED)
              stop();
          
      }
      
      
      // -------------------------------------------- CatalinaWrapper Inner Class
      
      
      private class CatalinaWrapper extends Catalina {
          
          
          public void start() {
              super.start();
          }
          
          
          public void stop() {
              super.stop();
          }
          
          
          public String getConfigFile() {
              return configFile;
          }
          
          
          public void setConfigFile(String configFile) {
              this.configFile = configFile;
          }
          
          
      }
      
      
  }
  
  
  
  1.1                  jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/CatalinaManagerMBean.java
  
  Index: CatalinaManagerMBean.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/CatalinaManagerMBean.java,v
1.1 2000/09/30 22:35:24 remm Exp $
   * $Revision: 1.1 $
   * $Date: 2000/09/30 22:35:24 $
   *
   * ====================================================================
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *    any, must include the following acknowlegement:  
   *       "This product includes software developed by the 
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
   *    Foundation" must not be used to endorse or promote products derived
   *    from this software without prior written permission. For written 
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   * [Additional notices, if required by prior licensing conditions]
   *
   */ 
  
  package org.apache.catalina.startup;
  
  /**
   * Catalina MBean interface.
   * 
   * @author <a href="mailto:remm@apache.org">Remy Maucherat</a>
   * @version $Revision: 1.1 $
   */
  
  public interface CatalinaManagerMBean {
      
      
      // -------------------------------------------------------------- Constants
      
      
      /**
       * Status constants.
       */
      public static final String[] states = 
      {"Stopped", "Stopping", "Starting", "Started"};
      
      
      public static final int STOPPED  = 0;
      public static final int STOPPING = 1;
      public static final int STARTING = 2;
      public static final int STARTED  = 3;
      
      
      /**
       * Component name.
       */
      public static final String NAME = "Catalina servlet container";
      
      
      /**
       * Object name.
       */
      public static final String OBJECT_NAME = ":service=Catalina";
      
      
      // ------------------------------------------------------ Interface Methods
      
      
      /**
       * Retruns the Catalina component name.
       */
      public String getName();
      
      
      /**
       * Returns the state.
       */
      public int getState();
      
      
      /**
       * Returns a String representation of the state.
       */
      public String getStateString();
      
      
      /**
       * Config file path accessor.
       */
      public String getConfigFile();
      
      
      /**
       * Config file path mutator.
       */
      public void setConfigFile(String configFile);
      
      
      /**
       * Start the servlet container.
       */
      public void start()
          throws Exception;
      
      
      /**
       * Stop the servlet container.
       */
      public void stop();
      
      
      /**
       * Destroy servlet container (if any is running).
       */
      public void destroy();
      
      
  }
  
  
  
  1.2       +4 -4      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/util/XMLWriter.java
  
  Index: XMLWriter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/util/XMLWriter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XMLWriter.java	2000/08/11 17:01:51	1.1
  +++ XMLWriter.java	2000/09/30 22:35:24	1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/util/XMLWriter.java,v
1.1 2000/08/11 17:01:51 craigmcc Exp $
  - * $Revision: 1.1 $
  - * $Date: 2000/08/11 17:01:51 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/util/XMLWriter.java,v
1.2 2000/09/30 22:35:24 remm Exp $
  + * $Revision: 1.2 $
  + * $Date: 2000/09/30 22:35:24 $
    *
    * ====================================================================
    *
  @@ -194,7 +194,7 @@
                   if (namespaceInfo != null) {
                       buffer.append("<" + namespace + ":" + name + " xmlns:" 
                                     + namespace + "=\"" 
  -                                  + namespaceInfo + ":\">");
  +                                  + namespaceInfo + "\">");
                   } else {
                       buffer.append("<" + namespace + ":" + name + ">");
                   }
  @@ -207,7 +207,7 @@
                   if (namespaceInfo != null) {
                       buffer.append("<" + namespace + ":" + name + " xmlns:" 
                                     + namespace + "=\"" 
  -                                  + namespaceInfo + ":\"/>");
  +                                  + namespaceInfo + "\"/>");
                   } else {
                       buffer.append("<" + namespace + ":" + name + "/>");
                   }
  
  
  

Mime
View raw message