You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bi...@apache.org on 2002/01/11 08:01:25 UTC

cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/modules/config LoaderInterceptor11.java

billbarker    02/01/10 23:01:24

  Modified:    src/share/org/apache/tomcat/modules/config
                        LoaderInterceptor11.java
  Log:
  Allow the user to optionally configure to use the 1.1 loader even under Java2.
  
  SimpleClassLoader should handle replaced jar files better than URLClassLoader.  This makes this an option for people that want jar reloading, and can live without enforcement of Java2 Manifest options.  Hopefully this gives the best of 3.2 and 3.3 for these people.
  
  Revision  Changes    Path
  1.24      +14 -1     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.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- LoaderInterceptor11.java	5 Dec 2001 11:26:57 -0000	1.23
  +++ LoaderInterceptor11.java	11 Jan 2002 07:01:24 -0000	1.24
  @@ -83,6 +83,7 @@
       boolean useCommonL=false;
       boolean useContainerL=false;
       boolean useNoParent=false;
  +    boolean use11Loader=false;
   
       boolean addJaxp=true;
       
  @@ -112,6 +113,13 @@
   	useNoParent=b;
       }
   
  +    /** Use the 1.1 loader even if running under Java2.
  +     *  This allows for a work-around to the currently broken URLClassLoader
  +     *  which can't reload classes from changed jar files.
  +     */
  +    public void setUse11Loader( boolean b ) {
  +	use11Loader = b;
  +    }
   
       /** Directory where jaxp jars are installed. Defaults to
   	tomcat_install/lib/container, where the parser used by
  @@ -324,7 +332,12 @@
   	    parent=this.getClass().getClassLoader();
   	}
   	
  -	ClassLoader loader=jdk11Compat.newClassLoaderInstance( classP, parent);
  +	ClassLoader loader=null;
  +	if( use11Loader ) {
  +	    loader = new SimpleClassLoader(classP, parent);
  +	} else {
  +	    loader=jdk11Compat.newClassLoaderInstance( classP, parent);
  +	}
   	if( debug > 0 )
   	    log("Loader " + loader.getClass().getName() + " " + parent);
   
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>