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/startup Bootstrap.java
Date Wed, 13 Feb 2002 20:01:37 GMT
craigmcc    02/02/13 12:01:37

  Modified:    catalina build.xml
               catalina/src/share/org/apache/catalina/startup
                        Bootstrap.java
  Log:
  Modify the way that the Common class loader is created to include the
  following contents:
    Unpacked classes in $CATALINA_HOME/common/classes
    All JAR files in $CATALINA_HOME/common/endorsed
    All JAR files in $CATALINA_HOME/common/lib
  and move the Xerces parser we install from "common/lib" to "common/endorsed".
  
  Background:  JDK 1.4, among many other changes, packages a version of Xerces
  and makes it accessible via the JAXP APIs.  However, because these are now
  classes in the Java runtime, you cannot normally override this with your
  own parser.  However, a mechanism is provided (setting the system property
  "java.endorsed.dirs" to point at a particular directory -- which we'll set
  to "$CATALINA_HOME/common/endorsed" in the startup scripts -- that replaces
  the embedded parser with the new one (such as Xerces 2.0).
  
  TODO:  Update the shell scripts to set the endorsed directory.
  
  TODO:  Update the class-loader-howto doc to describe all of this.
  
  Revision  Changes    Path
  1.104     +7 -3      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.103
  retrieving revision 1.104
  diff -u -r1.103 -r1.104
  --- build.xml	8 Feb 2002 07:03:25 -0000	1.103
  +++ build.xml	13 Feb 2002 20:01:37 -0000	1.104
  @@ -689,11 +689,11 @@
       <copy todir="${catalina.build}/common/lib" file="../lib/tyrex.license"/>
     </target>
     <target name="copy-xerces.jar" if="copy.xerces.jar">
  -    <copy todir="${catalina.build}/common/lib" file="${xerces.jar}"/>
  +    <copy todir="${catalina.build}/common/endorsed" file="${xerces.jar}"/>
     </target>
     <target name="copy-xerces2.jars" if="copy.xerces2.jars">
  -    <copy todir="${catalina.build}/common/lib" file="${xercesImpl.jar}"/>
  -    <copy todir="${catalina.build}/common/lib" file="${xmlParserAPIs.jar}"/>
  +    <copy todir="${catalina.build}/common/endorsed" file="${xercesImpl.jar}"/>
  +    <copy todir="${catalina.build}/common/endorsed" file="${xmlParserAPIs.jar}"/>
     </target>
   
   
  @@ -970,6 +970,7 @@
       <mkdir dir="${catalina.deploy}/conf"/>
       <mkdir dir="${catalina.deploy}/logs"/>
       <mkdir dir="${catalina.deploy}/common/classes"/>
  +    <mkdir dir="${catalina.deploy}/common/endorsed"/>
       <mkdir dir="${catalina.deploy}/common/lib"/>
       <mkdir dir="${catalina.deploy}/server/classes"/>
       <mkdir dir="${catalina.deploy}/server/lib"/>
  @@ -994,6 +995,9 @@
       <chmod perm="+x" file="${catalina.deploy}/bin/tool-wrapper.sh"/>
   
       <!-- Common Extensions -->
  +    <copy todir="${catalina.deploy}/common/endorsed">
  +      <fileset dir="${catalina.build}/common/endorsed" />
  +    </copy>
       <copy todir="${catalina.deploy}/common/lib">
         <fileset dir="${catalina.build}/common/lib" />
       </copy>
  
  
  
  1.34      +10 -7     jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Bootstrap.java
  
  Index: Bootstrap.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Bootstrap.java,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- Bootstrap.java	30 Dec 2001 01:58:20 -0000	1.33
  +++ Bootstrap.java	13 Feb 2002 20:01:37 -0000	1.34
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Bootstrap.java,v
1.33 2001/12/30 01:58:20 glenn Exp $
  - * $Revision: 1.33 $
  - * $Date: 2001/12/30 01:58:20 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Bootstrap.java,v
1.34 2002/02/13 20:01:37 craigmcc Exp $
  + * $Revision: 1.34 $
  + * $Date: 2002/02/13 20:01:37 $
    *
    * ====================================================================
    *
  @@ -85,7 +85,7 @@
    * class path and therefore not visible to application level classes.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.33 $ $Date: 2001/12/30 01:58:20 $
  + * @version $Revision: 1.34 $ $Date: 2002/02/13 20:01:37 $
    */
   
   public final class Bootstrap {
  @@ -128,14 +128,17 @@
   
               File unpacked[] = new File[1];
               File packed[] = new File[1];
  +            File packed2[] = new File[2];
               ClassLoaderFactory.setDebug(debug);
   
               unpacked[0] = new File(getCatalinaHome(),
                                      "common" + File.separator + "classes");
  -            packed[0] = new File(getCatalinaHome(),
  -                                 "common" + File.separator + "lib");
  +            packed2[0] = new File(getCatalinaHome(),
  +                                  "common" + File.separator + "endorsed");
  +            packed2[1] = new File(getCatalinaHome(),
  +                                  "common" + File.separator + "lib");
               commonLoader =
  -                ClassLoaderFactory.createClassLoader(unpacked, packed, null);
  +                ClassLoaderFactory.createClassLoader(unpacked, packed2, null);
   
               unpacked[0] = new File(getCatalinaHome(),
                                      "server" + File.separator + "classes");
  
  
  

--
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