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...@locus.apache.org on 2000/07/25 22:17:44 UTC

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

costin      00/07/25 13:17:43

  Modified:    src/share/org/apache/tomcat/core Container.java Context.java
                        ContextManager.java ServletLoader.java
                        ServletWrapper.java
  Log:
  - isTrusted() was disabled ( in order to keep the old applications running )
  
  - make sure all fields are initialized in container ( NPE when tomcat doesn't
  use any interceptor)
  
  - removed debug messages
  
  - added few comments/deprecation, preparing for class loader documentation
  and fixes.
  
  Revision  Changes    Path
  1.25      +2 -2      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.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- Container.java	2000/06/28 20:37:04	1.24
  +++ Container.java	2000/07/25 20:17:42	1.25
  @@ -123,8 +123,8 @@
       /** Per/container interceptors.
   	XXX Not implemented, it's easy to wire it in ( 2-3 h).
        */
  -    Vector contextInterceptors;
  -    Vector requestInterceptors;
  +    Vector contextInterceptors=new Vector();
  +    Vector requestInterceptors=new Vector();
       // interceptor cache - avoid Vector enumeration
       ContextInterceptor cInterceptors[];
       RequestInterceptor rInterceptors[];
  
  
  
  1.102     +3 -9      jakarta-tomcat/src/share/org/apache/tomcat/core/Context.java
  
  Index: Context.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/Context.java,v
  retrieving revision 1.101
  retrieving revision 1.102
  diff -u -r1.101 -r1.102
  --- Context.java	2000/07/11 02:37:27	1.101
  +++ Context.java	2000/07/25 20:17:42	1.102
  @@ -348,7 +348,6 @@
   	return envEntryTypes.keys();
       }
   
  -
       public String getInitParameter(String name) {
           return (String)initializationParameters.get(name);
       }
  @@ -959,6 +958,7 @@
    
        /**
         * Get the SecurityManager Permissions for this Context.
  +      *@deprecated Included in PD
         */
       public Object getPermissions() {
   	return perms;
  @@ -1048,16 +1048,10 @@
   	return trusted;
       }
   
  -    public boolean allowAttribute( String name ) {
  +    private boolean allowAttribute( String name ) {
   	// check if we can access this attribute.
   	if( isTrusted() ) return true;
  -	if( true ) {
  -	    // XXX  XXX XXX
  -	    log( "Illegal access to internal attribute ", null, Logger.ERROR);
  -	    return true;
  -	}
  -	 	
  -	// XXX We may check Permissions, etc 
  +	log( "Illegal access to internal attribute ", null, Logger.ERROR);
   	return false;
       }
   }
  
  
  
  1.103     +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.102
  retrieving revision 1.103
  diff -u -r1.102 -r1.103
  --- ContextManager.java	2000/07/11 02:40:08	1.102
  +++ ContextManager.java	2000/07/25 20:17:43	1.103
  @@ -1294,7 +1294,7 @@
        *
        */
       public Context getContext(String name) {
  -	loghelper.log("getContext(String) is deprecated", new Throwable("trace"), Logger.DEBUG);
  +	//	loghelper.log("getContext(String) is deprecated", new Throwable("trace"), Logger.DEBUG);
   	return (Context)contexts.get(name);
       }
   
  
  
  
  1.10      +8 -2      jakarta-tomcat/src/share/org/apache/tomcat/core/ServletLoader.java
  
  Index: ServletLoader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/ServletLoader.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ServletLoader.java	2000/06/10 17:54:26	1.9
  +++ ServletLoader.java	2000/07/25 20:17:43	1.10
  @@ -86,11 +86,13 @@
       public boolean shouldReload();
   
       /** Reset the class loader. The caller should take all actions
  -     *  required by this step ( free resources for GC, etc)
  +     *  required by this step ( free resources for GC, etc).
  +     *  part of the interceptor
        */
       public void reload();
   
       /** Return a real class loader
  +     *  The interceptor will set and maybe change the class loader
        */
       public ClassLoader getClassLoader();
       
  @@ -111,6 +113,8 @@
        *  a class loaded from this entry in the repository.
        *  Not all loaders can add resources dynamically -
        *  that may require a reload.
  +     * @deprecated each class loader has it's own mechanisms, the
  +     *  interceptor needs to deal with that.
        */
       public void addRepository( File f, Object protectionDomain );
       // XXX notify if it can't add it
  @@ -123,7 +127,9 @@
       // XXX notify if it can't add it
   
       /** The parent loader - used to load tomcat classes. The Loader must delegate
  -     *  to it, instead of using the system loader
  +     *  to it, instead of using the system loader.
  +     * 
  +     *  @deprecated the interceptor must deal with that.
        */
       public void setParentLoader( ClassLoader parent );
   
  
  
  
  1.62      +2 -0      jakarta-tomcat/src/share/org/apache/tomcat/core/ServletWrapper.java
  
  Index: ServletWrapper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/ServletWrapper.java,v
  retrieving revision 1.61
  retrieving revision 1.62
  diff -u -r1.61 -r1.62
  --- ServletWrapper.java	2000/07/11 03:48:44	1.61
  +++ ServletWrapper.java	2000/07/25 20:17:43	1.62
  @@ -180,10 +180,12 @@
        */
       public void addSecurityMapping( String name, String role,
   				    String description ) {
  +// 	System.out.println("Adding role:  " + name + " " + role + " " + securityRoleRefs + " " + this);
   	securityRoleRefs.put( name, role );
       }
   
       public String getSecurityRole( String name ) {
  +// 	System.out.println("Role: " + name + " "  +securityRoleRefs.get(name) + " " + securityRoleRefs + " " + this);
   	return (String)securityRoleRefs.get( name );
       }