tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core StandardContext.java
Date Mon, 09 Sep 2002 14:39:37 GMT
remm        2002/09/09 07:39:37

  Modified:    catalina/src/share/org/apache/catalina/core
                        StandardContext.java
  Log:
  - The timing of the setResources call was wrong when using a Resources
    element. This was in particular causing bug 12059 and duplicates.
  
  Revision  Changes    Path
  1.112     +12 -12    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.111
  retrieving revision 1.112
  diff -u -r1.111 -r1.112
  --- StandardContext.java	28 Aug 2002 12:03:15 -0000	1.111
  +++ StandardContext.java	9 Sep 2002 14:39:37 -0000	1.112
  @@ -1146,7 +1146,6 @@
       public synchronized void setResources(DirContext resources) {
   
           if (resources instanceof BaseDirContext) {
  -            ((BaseDirContext) resources).setDocBase(getBasePath());
               ((BaseDirContext) resources).setCached(isCachingAllowed());
           }
           if (resources instanceof FileDirContext) {
  @@ -3389,13 +3388,14 @@
                   log("Error initializing resources: " + e.getMessage());
                   ok = false;
               }
  -            if (ok) {
  -                DirContext dirContext = 
  -                    ((ProxyDirContext) resources).getDirContext();
  -                if ((dirContext != null) 
  -                    && (dirContext instanceof BaseDirContext)) {
  -                    ((BaseDirContext) dirContext).allocate();
  -                }
  +        }
  +        if (ok && (resources instanceof ProxyDirContext)) {
  +            DirContext dirContext = 
  +                ((ProxyDirContext) resources).getDirContext();
  +            if ((dirContext != null) 
  +                && (dirContext instanceof BaseDirContext)) {
  +                ((BaseDirContext) dirContext).setDocBase(getBasePath());
  +                ((BaseDirContext) dirContext).allocate();
               }
           }
           if (getLoader() == null) {      // (2) Required by Manager
  
  
  

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message