costin      01/08/20 21:58:22

  Modified:    src/share/org/apache/tomcat/modules/config
                        LoaderInterceptor11.java
  Log:
  Use _application_ loader, not parent loader. It worked because of a double bug,
  but fixing the first bug revealed this one.
  
  Revision  Changes    Path
  1.17      +13 -4     
jakarta-tomcat/src/share/org/apache/tomcat/modules/config/LoaderInterceptor11.java
  
  Index: LoaderInterceptor11.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/config/LoaderInterceptor11.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- LoaderInterceptor11.java  2001/07/19 05:56:00     1.16
  +++ LoaderInterceptor11.java  2001/08/21 04:58:22     1.17
  @@ -78,9 +78,14 @@
    * @author [EMAIL PROTECTED]
    */
   public class LoaderInterceptor11 extends BaseInterceptor {
  -    boolean useAL=true;
  +    boolean useAppsL=true;
  +    boolean useParentL=false;
  +    boolean useCommonL=false;
  +    boolean useContainerL=false;
       boolean useNoParent=false;
  +
       private int attributeInfo;
  +    String loader=null;
       
       public LoaderInterceptor11() {
       }
  @@ -89,7 +94,7 @@
        *  that is set by the application embedding tomcat.
        */
       public void setUseApplicationLoader( boolean b ) {
  -     useAL=b;
  +     useAppsL=b;
       }
   
       /** Use no parent loader. The contexts will be completely isolated.
  @@ -98,6 +103,10 @@
        useNoParent=b;
       }
   
  +    public void setLoader( String name ) {
  +     loader=name;
  +    }
  +    
       public void engineInit( ContextManager cm )
        throws TomcatException
       {
  @@ -198,9 +207,9 @@
           }
   
        ClassLoader parent=null;
  -     if( useAL && !context.isTrusted() ) {
  +     if( useAppsL && !context.isTrusted() ) {
            if( debug > 0 ) log( "Using webapp loader " + context.isTrusted());
  -         parent=cm.getParentLoader();
  +         parent=cm.getAppsLoader();
        } else if( useNoParent ) {
            if( debug > 0 ) log( "Using no parent loader ");
            parent=null;
  
  
  

Reply via email to