remm        01/07/25 17:15:59

  Modified:    catalina/src/share/org/apache/catalina/core
                        StandardContext.java
  Log:
  - Add a cachingAllowed flag on the standard context. The caching flag
    on the proxy dir context will be removed since it was not flexible enough
    (the flag could only be set after the context resources were set, which
    usually was after starting it).
  
  Revision  Changes    Path
  1.72      +28 -6     
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java
  
  Index: StandardContext.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
  retrieving revision 1.71
  retrieving revision 1.72
  diff -u -r1.71 -r1.72
  --- StandardContext.java      2001/07/25 04:05:50     1.71
  +++ StandardContext.java      2001/07/26 00:15:58     1.72
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
 1.71 2001/07/25 04:05:50 remm Exp $
  - * $Revision: 1.71 $
  - * $Date: 2001/07/25 04:05:50 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
 1.72 2001/07/26 00:15:58 remm Exp $
  + * $Revision: 1.72 $
  + * $Date: 2001/07/26 00:15:58 $
    *
    * ====================================================================
    *
  @@ -142,7 +142,7 @@
    *
    * @author Craig R. McClanahan
    * @author Remy Maucherat
  - * @version $Revision: 1.71 $ $Date: 2001/07/25 04:05:50 $
  + * @version $Revision: 1.72 $ $Date: 2001/07/26 00:15:58 $
    */
   
   public class StandardContext
  @@ -480,10 +480,32 @@
       private String namingContextName = null;
   
   
  +    /**
  +     * Caching allowed flag.
  +     */
  +    protected boolean cachingAllowed = true;
  +
  +
       // ----------------------------------------------------- Context Properties
   
   
       /**
  +     * Is caching allowed ?
  +     */
  +    public boolean isCachingAllowed() {
  +        return cachingAllowed;
  +    }
  +
  +
  +    /**
  +     * Set caching allowed flag.
  +     */
  +    public void setCachingAllowed(boolean cachingAllowed) {
  +        this.cachingAllowed = cachingAllowed;
  +    }
  +
  +
  +    /**
        * Returns true if the internal naming support is used.
        */
       public boolean isUseNaming() {
  @@ -989,8 +1011,8 @@
       public synchronized void setResources(DirContext resources) {
   
           if (resources instanceof BaseDirContext) {
  -            if (resources instanceof BaseDirContext)
  -                ((BaseDirContext) resources).setDocBase(getBasePath());
  +            ((BaseDirContext) resources).setDocBase(getBasePath());
  +            ((BaseDirContext) resources).setCached(isCachingAllowed());
           }
           if (resources instanceof FileDirContext) {
               filesystemBased = true;
  
  
  

Reply via email to