tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup Bootstrap.java BootstrapService.java
Date Fri, 19 Oct 2001 05:58:57 GMT
remm        01/10/18 22:58:57

  Modified:    catalina/src/share/org/apache/catalina/startup
                        Bootstrap.java BootstrapService.java
  Log:
  - The shared classloader is created based on catalina.base
    (instead of catalinaHome). This is experimental.
  - The shared loader was created by BootstrapService
    as the old directory structure (lib and classes, instead
    of shared/lib and shared/classes).
  
  Revision  Changes    Path
  1.30      +14 -6     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.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- Bootstrap.java	2001/10/03 21:39:12	1.29
  +++ Bootstrap.java	2001/10/19 05:58:57	1.30
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Bootstrap.java,v
1.29 2001/10/03 21:39:12 craigmcc Exp $
  - * $Revision: 1.29 $
  - * $Date: 2001/10/03 21:39:12 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Bootstrap.java,v
1.30 2001/10/19 05:58:57 remm Exp $
  + * $Revision: 1.30 $
  + * $Date: 2001/10/19 05:58:57 $
    *
    * ====================================================================
    *
  @@ -85,7 +85,7 @@
    * class path and therefore not visible to application level classes.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.29 $ $Date: 2001/10/03 21:39:12 $
  + * @version $Revision: 1.30 $ $Date: 2001/10/19 05:58:57 $
    */
   
   public final class Bootstrap {
  @@ -145,9 +145,9 @@
                   ClassLoaderFactory.createClassLoader(unpacked, packed,
                                                        commonLoader);
   
  -            unpacked[0] = new File(getCatalinaHome(),
  +            unpacked[0] = new File(getCatalinaBase(),
                                      "shared" + File.separator + "classes");
  -            packed[0] = new File(getCatalinaHome(),
  +            packed[0] = new File(getCatalinaBase(),
                                    "shared" + File.separator + "lib");
               sharedLoader =
                   ClassLoaderFactory.createClassLoader(unpacked, packed,
  @@ -259,6 +259,14 @@
       private static String getCatalinaHome() {
           return System.getProperty("catalina.home",
                                     System.getProperty("user.dir"));
  +    }
  +
  +
  +    /**
  +     * Get the value of the catalina.base environment variable.
  +     */
  +    private static String getCatalinaBase() {
  +        return System.getProperty("catalina.base", getCatalinaHome());
       }
   
   
  
  
  
  1.10      +25 -13    jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/BootstrapService.java
  
  Index: BootstrapService.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/BootstrapService.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- BootstrapService.java	2001/10/03 21:39:12	1.9
  +++ BootstrapService.java	2001/10/19 05:58:57	1.10
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/BootstrapService.java,v
1.9 2001/10/03 21:39:12 craigmcc Exp $
  - * $Revision: 1.9 $
  - * $Date: 2001/10/03 21:39:12 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/BootstrapService.java,v
1.10 2001/10/19 05:58:57 remm Exp $
  + * $Revision: 1.10 $
  + * $Date: 2001/10/19 05:58:57 $
    *
    * ====================================================================
    *
  @@ -86,7 +86,7 @@
    *
    * @author Craig R. McClanahan
    * @author Remy Maucherat
  - * @version $Revision: 1.9 $ $Date: 2001/10/03 21:39:12 $
  + * @version $Revision: 1.10 $ $Date: 2001/10/19 05:58:57 $
    */
   
   public final class BootstrapService 
  @@ -314,24 +314,28 @@
                       ClassLoaderFactory.setDebug(debug);
   
                       unpacked[0] = new File(getCatalinaHome(),
  -                                           "common" + File.separator + "classes");
  +                                           "common" + File.separator 
  +                                           + "classes");
                       packed[0] = new File(getCatalinaHome(),
                                            "common" + File.separator + "lib");
                       commonLoader =
  -                        ClassLoaderFactory.createClassLoader(unpacked, packed, null);
  +                        ClassLoaderFactory.createClassLoader
  +                        (unpacked, packed, null);
   
                       unpacked[0] = new File(getCatalinaHome(),
  -                                           "server" + File.separator + "classes");
  +                                           "server" + File.separator 
  +                                           + "classes");
                       packed[0] = new File(getCatalinaHome(),
                                            "server" + File.separator + "lib");
                       catalinaLoader =
                           ClassLoaderFactory.createClassLoader(unpacked, packed,
                                                                commonLoader);
   
  -                    unpacked[0] = new File(getCatalinaHome(),
  -                                           "classes");
  -                    packed[0] = new File(getCatalinaHome(),
  -                                         "lib");
  +                    unpacked[0] = new File(getCatalinaBase(), 
  +                                           "shared" + File.separator 
  +                                           + "classes");
  +                    packed[0] = new File(getCatalinaBase(),
  +                                         "shared" + File.separator + "lib");
                       sharedLoader =
                           ClassLoaderFactory.createClassLoader(unpacked, packed,
                                                                commonLoader);
  @@ -406,8 +410,8 @@
                   paramTypes[0] = Class.forName("java.lang.ClassLoader");
                   Object paramValues[] = new Object[1];
                   paramValues[0] = sharedLoader;
  -                Method method =
  -                    startupInstance.getClass().getMethod(methodName, paramTypes);
  +                Method method = startupInstance.getClass().getMethod
  +                    (methodName, paramTypes);
                   method.invoke(startupInstance, paramValues);
   
                   catalina = startupInstance;
  @@ -475,6 +479,14 @@
       private static String getCatalinaHome() {
           return System.getProperty("catalina.home",
                                     System.getProperty("user.dir"));
  +    }
  +
  +
  +    /**
  +     * Get the value of the catalina.base environment variable.
  +     */
  +    private static String getCatalinaBase() {
  +        return System.getProperty("catalina.base", getCatalinaHome());
       }
   
   
  
  
  

Mime
View raw message