You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by vg...@apache.org on 2001/08/20 22:23:52 UTC

cvs commit: xml-cocoon2/src/org/apache/cocoon Cocoon.java

vgritsenko    01/08/20 13:23:52

  Modified:    src/org/apache/cocoon Cocoon.java
  Log:
  restore environment state
  
  Revision  Changes    Path
  1.19      +5 -3      xml-cocoon2/src/org/apache/cocoon/Cocoon.java
  
  Index: Cocoon.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/Cocoon.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- Cocoon.java	2001/08/20 13:55:09	1.18
  +++ Cocoon.java	2001/08/20 20:23:52	1.19
  @@ -51,7 +51,7 @@
    *
    * @author <a href="mailto:fumagalli@exoffice.com">Pierpaolo Fumagalli</a> (Apache Software Foundation, Exoffice Technologies)
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
  - * @version CVS $Revision: 1.18 $ $Date: 2001/08/20 13:55:09 $
  + * @version CVS $Revision: 1.19 $ $Date: 2001/08/20 20:23:52 $
    */
   public class Cocoon extends AbstractLoggable implements ThreadSafe, Component, Initializable, Disposable, Modifiable, Processor, Contextualizable {
       /** The application context */
  @@ -434,6 +434,7 @@
       public void generateSitemap(Environment environment)
       throws Exception {
           ProgramGenerator programGenerator = null;
  +        SourceHandler oldSourceHandler = environment.getSourceHandler();
           SourceHandler sourceHandler = null;
           try {
               programGenerator = (ProgramGenerator) this.componentManager.lookup(ProgramGenerator.ROLE);
  @@ -455,7 +456,7 @@
               getLogger().error("Main: Error compiling sitemap", e);
               throw e;
           } finally {
  -            environment.setSourceHandler(null);
  +            environment.setSourceHandler(oldSourceHandler);
               if (programGenerator != null) this.componentManager.release(programGenerator);
               if (sourceHandler != null) this.componentManager.release((Component) sourceHandler);
           }
  @@ -467,6 +468,7 @@
       public void generateXSP(String fileName, Environment environment)
       throws Exception {
           ProgramGenerator programGenerator = null;
  +        SourceHandler oldSourceHandler = environment.getSourceHandler();
           SourceHandler sourceHandler = null;
           try {
               getLogger().debug("XSP generation begin:" + fileName);
  @@ -485,7 +487,7 @@
               getLogger().error("Main: Error compiling XSP", e);
               throw e;
           } finally {
  -            environment.setSourceHandler(null);
  +            environment.setSourceHandler(oldSourceHandler);
               if (programGenerator != null) this.componentManager.release(programGenerator);
               if (sourceHandler != null) this.componentManager.release((Component) sourceHandler);
           }
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org