tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/modules/mappers ReloadInterceptor.java
Date Tue, 25 Sep 2001 04:33:45 GMT
bojan       01/09/24 21:33:45

  Modified:    src/share/org/apache/tomcat/modules/mappers
                        ReloadInterceptor.java
  Log:
  Enable local interceptor reload at context reload.
  
  Revision  Changes    Path
  1.12      +18 -0     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.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- ReloadInterceptor.java	2001/09/16 00:33:30	1.11
  +++ ReloadInterceptor.java	2001/09/25 04:33:45	1.12
  @@ -184,6 +184,14 @@
   	    ContextManager cm=ctx.getContextManager();
   	    
   	    if( fullReload ) {
  +		Vector sI=new Vector();  // saved local interceptors
  +		BaseInterceptor[] eI;    // all exisiting interceptors
  +
  +		// save the ones with the same context, they are local
  +		eI=ctx.getContainer().getInterceptors();
  +		for(int i=0; i < eI.length ; i++)
  +		    if(ctx == eI[i].getContext()) sI.add(eI[i]);
  +                
   		Enumeration e;
   		// Need to find all the "config" that
   		// was read from server.xml.
  @@ -205,6 +213,16 @@
   		cm.removeContext( ctx );
   
   		cm.addContext( ctx1 );
  +
  +		// put back saved local interceptors
  +		e=sI.elements();
  +		while(e.hasMoreElements()){
  +		    BaseInterceptor savedI=(BaseInterceptor)e.nextElement();
  +
  +		    ctx1.addInterceptor(savedI);
  +		    savedI.setContext(ctx1);
  +		    savedI.reload(request,ctx1);
  +		}
   
   		ctx1.init();
   
  
  
  

Mime
View raw message