No this is not possible, as a processor calls process() of another process
for sub sitemap handling and a new startProcessing() for each move into
a sub sitemap would result in some problems. Each processor calls
the enter/leaveEnvironment functions.

Carsten

> -----Original Message-----
> From: Sylvain Wallez [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 10, 2003 4:06 PM
> To: [EMAIL PROTECTED]
> Subject: Re: cvs commit:
> cocoon-2.1/src/java/org/apache/cocoon/environment ForwardRedirector.java
> 
> 
> Just some thoughts : shouldn't it be the job of the Processor to call 
> startProcessing/endProcessing instead of having it duplicated in every 
> place where Processor.process() is called ?
> 
> Sylvain
> 
> [EMAIL PROTECTED] wrote:
> 
> >cziegeler    2003/03/10 06:23:00
> >
> >  Modified:    src/java/org/apache/cocoon/environment
> >                        ForwardRedirector.java
> >  Log:
> >  Perhaps fixing bug 17673
> >  
> >  Revision  Changes    Path
> >  1.2       +15 -7     
> cocoon-2.1/src/java/org/apache/cocoon/environment/ForwardRedirector.java
> >  
> >  Index: ForwardRedirector.java
> >  ===================================================================
> >  RCS file: 
> /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/environment/Forwar
> dRedirector.java,v
> >  retrieving revision 1.1
> >  retrieving revision 1.2
> >  diff -u -r1.1 -r1.2
> >  --- ForwardRedirector.java 9 Mar 2003 00:09:28 -0000       1.1
> >  +++ ForwardRedirector.java 10 Mar 2003 14:23:00 -0000      1.2
> >  @@ -56,6 +56,7 @@
> >   import org.apache.avalon.framework.component.ComponentManager;
> >   import org.apache.cocoon.ProcessingException;
> >   import org.apache.cocoon.Processor;
> >  +import org.apache.cocoon.components.CocoonComponentManager;
> >   import org.apache.cocoon.components.pipeline.ProcessingPipeline;
> >   import org.apache.cocoon.environment.wrapper.EnvironmentWrapper;
> >   
> >  @@ -197,13 +198,20 @@
> >               boolean processingResult;
> >   
> >               // FIXME - What to do here?
> >  -            if ( !this.internal ) {
> >  -                processingResult = actualProcessor.process(newEnv);
> >  -            } else {
> >  -                ProcessingPipeline pp = 
> actualProcessor.processInternal(newEnv);
> >  -                if (pp != null) pp.release();
> >  -                processingResult = pp != null;
> >  +            Object processKey = 
> CocoonComponentManager.startProcessing(newEnv);
> >  +            try {
> >  +                
> >  +                if ( !this.internal ) {
> >  +                    processingResult = 
> actualProcessor.process(newEnv);
> >  +                } else {
> >  +                    ProcessingPipeline pp = 
> actualProcessor.processInternal(newEnv);
> >  +                    if (pp != null) pp.release();
> >  +                    processingResult = pp != null;
> >  +                }
> >  +            } finally {
> >  +                CocoonComponentManager.endProcessing(newEnv, 
> processKey);
> >               }
> >  +
> >   
> >               if (!processingResult) {
> >                   throw new ProcessingException("Couldn't 
> process URI " + requestURI);
> >  
> >  
> >  
> >  
> >
> 
> 
> -- 
> Sylvain Wallez                                  Anyware Technologies
> http://www.apache.org/~sylvain           http://www.anyware-tech.com
> { XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
> 
> 

Reply via email to