You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by co...@apache.org on 2001/06/28 09:43:15 UTC

cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/core BaseInterceptor.java Container.java ContextManager.java

costin      01/06/28 00:43:14

  Modified:    src/share/org/apache/tomcat/core BaseInterceptor.java
                        Container.java ContextManager.java
  Log:
  Added an extra comment about the return value for registerHooks,
  avoid the call to introspection by using the return value, use the
  default in ContextManager to avoid config issues ( when server.xml is
  not used ).
  
  I did a small review of the initialziation code, in order to make
  sure we respect the original goal of flexibility in the way tomcat is
  configured - and we don't depend at the core level on any particular
  configuration mechanism.
  
  The decoupling of Hook from introspection allow tomcat to reduce even further
  the requirements on the VM ( since many embedded VMs do not support
  introspection )
  
  Revision  Changes    Path
  1.47      +2 -1      jakarta-tomcat/src/share/org/apache/tomcat/core/BaseInterceptor.java
  
  Index: BaseInterceptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/BaseInterceptor.java,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- BaseInterceptor.java	2001/05/26 17:45:18	1.46
  +++ BaseInterceptor.java	2001/06/28 07:43:00	1.47
  @@ -619,9 +619,10 @@
        *
        *  Most modules are added to the Hooks automatically. A module
        *  overriding this method has full control over this process.
  +     *  If OK is returned, no other processing is done ( i.e. no introspection,
  +     *  we assume the module set up the right hooks )
        */
       public int registerHooks(Hooks h, ContextManager cm, Context ctx) {
   	return DECLINED;
       }
  -
   }
  
  
  
  1.51      +2 -3      jakarta-tomcat/src/share/org/apache/tomcat/core/Container.java
  
  Index: Container.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/Container.java,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- Container.java	2001/05/26 17:45:18	1.50
  +++ Container.java	2001/06/28 07:43:03	1.51
  @@ -441,9 +441,8 @@
       public void addInterceptor( BaseInterceptor bi ) {
   	bi.setContext( getContext() );
   
  -	if( Hooks.hasHook( bi, "registerHooks" ) ) {
  -	    bi.registerHooks( hooks, contextM, context );
  -	} else {
  +	int status=bi.registerHooks( hooks, contextM, context );
  +	if( status!=BaseInterceptor.OK ) {
   	    hooks.addModule( bi );
   	}
   	hooksCache=null;
  
  
  
  1.182     +1 -1      jakarta-tomcat/src/share/org/apache/tomcat/core/ContextManager.java
  
  Index: ContextManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/ContextManager.java,v
  retrieving revision 1.181
  retrieving revision 1.182
  diff -u -r1.181 -r1.182
  --- ContextManager.java	2001/06/21 13:04:43	1.181
  +++ ContextManager.java	2001/06/28 07:43:05	1.182
  @@ -195,7 +195,7 @@
   
       /** Private workspace for this server
        */
  -    private String workDir;
  +    private String workDir="work";
   
       /** The base directory where this instance runs.
        *  It can be different from the install directory to