cziegeler    2003/01/10 02:43:19

  Modified:    src/java/org/apache/cocoon Tag: cocoon_2_0_3_branch
                        Cocoon.java
  Log:
  Adding error message *if* the environment is not properly cleaned. Perhaps this 
helps in finding/reproducing the problem
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.22.2.7  +10 -4     xml-cocoon2/src/java/org/apache/cocoon/Cocoon.java
  
  Index: Cocoon.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/Cocoon.java,v
  retrieving revision 1.22.2.6
  retrieving revision 1.22.2.7
  diff -u -r1.22.2.6 -r1.22.2.7
  --- Cocoon.java       4 Dec 2002 09:56:24 -0000       1.22.2.6
  +++ Cocoon.java       10 Jan 2003 10:43:19 -0000      1.22.2.7
  @@ -69,6 +69,7 @@
   import org.apache.avalon.framework.logger.AbstractLoggable;
   import org.apache.avalon.framework.thread.ThreadSafe;
   import org.apache.cocoon.components.CocoonComponentManager;
  +import org.apache.cocoon.components.EnvironmentStack;
   import org.apache.cocoon.components.language.generator.CompiledComponent;
   import org.apache.cocoon.components.language.generator.ProgramGenerator;
   import org.apache.cocoon.components.pipeline.EventPipeline;
  @@ -587,9 +588,14 @@
                   }
               }
           } finally {
  -           CocoonComponentManager.endProcessing(environment, key);
  -           if (this.getLogger().isDebugEnabled()) {
  -                --activeRequestCount;
  +            CocoonComponentManager.endProcessing(environment, key);
  +            if (this.getLogger().isDebugEnabled()) {
  +                 --activeRequestCount;
  +            }
  +            // TODO (CZ): This is only for testing - remove it later on
  +            EnvironmentStack stack = 
CocoonComponentManager.getCurrentEnvironmentStack();
  +            if (stack != null && !stack.isEmpty() ) {
  +                this.getLogger().error("ENVIRONMENT STACK HAS NOT BEEN CLEANED 
PROPERLY");        
               }
           }
       }
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to