tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject cvs commit: jakarta-tomcat/src/facade22/org/apache/tomcat/facade JspInterceptor.java
Date Tue, 27 Feb 2001 16:56:37 GMT
costin      01/02/27 08:56:36

  Modified:    src/share/org/apache/tomcat/modules/config
                        LoaderInterceptor11.java
               src/share/org/apache/tomcat/modules/mappers
                        ReloadInterceptor.java
               src/facade22/org/apache/tomcat/facade JspInterceptor.java
  Log:
  DependManager is a note, shared by those modules.
  
  Revision  Changes    Path
  1.7       +7 -3      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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- LoaderInterceptor11.java	2001/02/06 02:46:26	1.6
  +++ LoaderInterceptor11.java	2001/02/27 16:56:24	1.7
  @@ -149,10 +149,13 @@
   		log("    " + classP[i].toString() );
   	}
   
  -	DependManager dm=context.getDependManager();
  +	DependManager dm=(DependManager)context.getContainer().
  +	    getNote("DependManager");
  +	//context.getDependManager();
   	if( dm==null ) {
   	    dm=new DependManager();
  -	    context.setDependManager( dm );
  +	    context.getContainer().setNote("DependManager", dm);
  +	    //setDependManager( dm );
   	}
   
   	ClassLoader parent=null;
  @@ -188,7 +191,8 @@
   	}
   
   	DependManager dm=new DependManager();
  -	context.setDependManager( dm );
  +	context.getContainer().setNote("DependManager", dm);
  +	//setDependManager( dm );
   	ClassLoader oldLoader=context.getClassLoader();
   	int oldLoaderNote=cm.getNoteId( ContextManager.CONTAINER_NOTE,
   					"oldLoader");
  
  
  
  1.3       +14 -3     jakarta-tomcat/src/share/org/apache/tomcat/modules/mappers/ReloadInterceptor.java
  
  Index: ReloadInterceptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/mappers/ReloadInterceptor.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ReloadInterceptor.java	2001/01/14 20:55:27	1.2
  +++ ReloadInterceptor.java	2001/02/27 16:56:30	1.3
  @@ -77,10 +77,16 @@
   {
       // Stop and start the context.
       boolean fullReload=true;
  +    int dependManagerNote=-1;
       
       public ReloadInterceptor() {
       }
   
  +    public void engineInit( ContextManager cm ) throws TomcatException {
  +	dependManagerNote=cm.getNoteId(ContextManager.CONTAINER_NOTE,
  +				       "DependManager");
  +    }
  +    
       /** A full reload will stop and start the context, without
        *  saving any state. It's the cleanest form of reload, equivalent
        *  with (partial) server restart.
  @@ -96,10 +102,13 @@
   	throws TomcatException
       {
           ContextManager cm = context.getContextManager();
  -	DependManager dm=context.getDependManager();
  +	DependManager dm=(DependManager)context.getContainer().
  +	    getNote("DependManager");
  +	// getDependManager();
   	if( dm==null ) {
   	    dm=new DependManager();
  -	    context.setDependManager( dm );
  +	    context.getContainer().setNote("DependManager", dm);
  +	    //setDependManager( dm );
   	}
   
   	File inf_xml = new File(context.getAbsolutePath() +
  @@ -121,7 +130,9 @@
   	// XXX This interceptor will be added per/context.
   	if( ! ctx.getReloadable() ) return 0;
   
  -	if( ! ctx.shouldReload() ) return 0;
  +	DependManager dm=(DependManager)ctx.getContainer().
  +	    getNote(dependManagerNote);
  +	if( ! dm.shouldReload() ) return 0;
   
   	if( debug> 0 )
   	    log( "Detected changes in " + ctx.toString());
  
  
  
  1.16      +9 -1      jakarta-tomcat/src/facade22/org/apache/tomcat/facade/JspInterceptor.java
  
  Index: JspInterceptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/facade22/org/apache/tomcat/facade/JspInterceptor.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- JspInterceptor.java	2001/02/20 03:34:11	1.15
  +++ JspInterceptor.java	2001/02/27 16:56:33	1.16
  @@ -789,7 +789,15 @@
   	if( debug>0 )
   	    log.log("origin = " + dep.getOrigin() + " " +
   		    dep.getOrigin().lastModified());
  -	ctx.getDependManager().addDependency( dep );
  +	try {
  +	    DependManager dm=(DependManager)ctx.getContainer().
  +		getNote("DependManager");
  +	    if( dm!=null ) {
  +		dm.addDependency( dep );
  +	    }
  +	} catch( TomcatException ex ) {
  +	    ex.printStackTrace();
  +	}
   	info.setDependency( dep );
   	return dep;
       }
  
  
  

Mime
View raw message