cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blorit...@apache.org
Subject cvs commit: xml-cocoon/src/org/apache/cocoon/transformation I18nTransformer.java LogTransformer.java SQLTransformer.java TraxTransformer.java XIncludeTransformer.java XTTransformer.java
Date Mon, 19 Feb 2001 15:58:11 GMT
bloritsch    01/02/19 07:58:11

  Modified:    src/org/apache/cocoon/components/language/generator Tag:
                        xml-cocoon2 ProgramGeneratorImpl.java
               src/org/apache/cocoon/generation Tag: xml-cocoon2
                        DirectoryGenerator.java FileGenerator.java
                        FragmentExtractorGenerator.java HTMLGenerator.java
                        ImageDirectoryGenerator.java PhpGenerator.java
                        RequestGenerator.java StatusGenerator.java
               src/org/apache/cocoon/reading Tag: xml-cocoon2
                        AbstractReader.java ResourceReader.java
               src/org/apache/cocoon/serialization Tag: xml-cocoon2
                        FOPSerializer.java HTMLSerializer.java
                        LinkSerializer.java SVGSerializer.java
                        TextSerializer.java XMLSerializer.java
               src/org/apache/cocoon/sitemap Tag: xml-cocoon2
                        ResourcePipeline.java
               src/org/apache/cocoon/transformation Tag: xml-cocoon2
                        I18nTransformer.java LogTransformer.java
                        SQLTransformer.java TraxTransformer.java
                        XIncludeTransformer.java XTTransformer.java
  Log:
  Added fixes for pooling--Using new PoolClient class that works with hiding the
  Pool implementation from the user of the class.  Alternative is to make
  all components "returned" to their manager.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.31  +32 -28    xml-cocoon/src/org/apache/cocoon/components/language/generator/Attic/ProgramGeneratorImpl.java
  
  Index: ProgramGeneratorImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/components/language/generator/Attic/ProgramGeneratorImpl.java,v
  retrieving revision 1.1.2.30
  retrieving revision 1.1.2.31
  diff -u -r1.1.2.30 -r1.1.2.31
  --- ProgramGeneratorImpl.java	2001/02/17 19:09:10	1.1.2.30
  +++ ProgramGeneratorImpl.java	2001/02/19 15:58:08	1.1.2.31
  @@ -45,7 +45,7 @@
   /**
    * The default implementation of <code>ProgramGenerator</code>
    * @author <a href="mailto:ricardo@apache.org">Ricardo Rocha</a>
  - * @version CVS $Revision: 1.1.2.30 $ $Date: 2001/02/17 19:09:10 $
  + * @version CVS $Revision: 1.1.2.31 $ $Date: 2001/02/19 15:58:08 $
    */
   public class ProgramGeneratorImpl extends AbstractLoggable implements ProgramGenerator,
Contextualizable, Composer, Configurable, ThreadSafe {
   
  @@ -141,7 +141,6 @@
           // Set filenames
           String filename = IOUtils.getFullFilename(file);
           String normalizedName = IOUtils.normalizedFilename(filename);
  -        String sourceExtension = programmingLanguage.getSourceExtension();
           // Ensure no 2 requests for the same file overlap
           Class program = null;
           CompiledComponent programInstance = null;
  @@ -150,19 +149,12 @@
           try {
               programInstance = (CompiledComponent) this.cache.select(normalizedName);
           } catch (Exception e) {
  -            getLogger().debug("The instance was not accessible, creating it now.", e);
  +            getLogger().debug("The instance was not accessible, creating it now.");
           }
   
           if (programInstance == null) {
               try {
  -                /*
  -                 * FIXME: Passing null as encoding may result in invalid
  -                 * recompilation under certain circumstances!
  -                 */
  -
  -                program = programmingLanguage.load(normalizedName, this.workDir, null);
  -                // Store loaded program in cache
  -                this.cache.addGenerator(normalizedName, program);
  +                program = generateResource(file, filename, normalizedName, markupLanguage,
programmingLanguage, resolver);
               } catch (LanguageException le) {
                   getLogger().debug("Language Exception", le);
               }
  @@ -190,25 +182,37 @@
           }
   
           if (program == null) {
  -            // Generate code
  -            String code = markupLanguage.generateCode(
  -                new InputSource(
  -                new FileReader(file)), normalizedName, programmingLanguage, resolver);
  -            String encoding = markupLanguage.getEncoding();
  -            // Format source code if applicable
  -            CodeFormatter codeFormatter = programmingLanguage.getCodeFormatter();
  -            if (codeFormatter != null) {
  -                code = codeFormatter.format(code, encoding);
  -            }
  -            // Store generated code
  -            String sourceFilename = filename + "." + sourceExtension;
  -            repository.store(sourceFilename, code);
  -            // [Compile]/Load generated program
  -            program = programmingLanguage.load(normalizedName, this.workDir, encoding);
  -            // Store generated program in cache
  -            this.cache.addGenerator(normalizedName, program);
  +            program = generateResource(file, filename, normalizedName, markupLanguage,
programmingLanguage, resolver);
           }
           // Instantiate
           return (CompiledComponent) this.cache.select(normalizedName);
  +    }
  +
  +    private Class generateResource(File file,
  +                                  String filename,
  +                                  String normalizedName,
  +                                  MarkupLanguage markupLanguage,
  +                                  ProgrammingLanguage programmingLanguage,
  +                                  EntityResolver resolver)
  +    throws Exception {
  +        // Generate code
  +        String code = markupLanguage.generateCode(
  +            new InputSource(
  +            new FileReader(file)), normalizedName, programmingLanguage, resolver);
  +        String encoding = markupLanguage.getEncoding();
  +        // Format source code if applicable
  +        CodeFormatter codeFormatter = programmingLanguage.getCodeFormatter();
  +        if (codeFormatter != null) {
  +            code = codeFormatter.format(code, encoding);
  +        }
  +        // Store generated code
  +        String sourceFilename = filename + "." + programmingLanguage.getSourceExtension();
  +        repository.store(sourceFilename, code);
  +        // [Compile]/Load generated program
  +        Class program = programmingLanguage.load(normalizedName, this.workDir, markupLanguage.getEncoding());
  +        // Store generated program in cache
  +        this.cache.addGenerator(normalizedName, program);
  +
  +        return program;
       }
   }
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.18  +14 -3     xml-cocoon/src/org/apache/cocoon/generation/Attic/DirectoryGenerator.java
  
  Index: DirectoryGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/generation/Attic/DirectoryGenerator.java,v
  retrieving revision 1.1.2.17
  retrieving revision 1.1.2.18
  diff -u -r1.1.2.17 -r1.1.2.18
  --- DirectoryGenerator.java	2001/02/12 14:17:32	1.1.2.17
  +++ DirectoryGenerator.java	2001/02/19 15:58:08	1.1.2.18
  @@ -21,12 +21,13 @@
   import org.xml.sax.helpers.AttributesImpl;
   
   import org.apache.avalon.Parameters;
  -import org.apache.avalon.Poolable;
  +import org.apache.avalon.util.pool.Pool;
   
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.Roles;
   import org.apache.cocoon.ResourceNotFoundException;
   import org.apache.cocoon.components.url.URLFactory;
  +import org.apache.cocoon.PoolClient;
   
   /**
    * Generates an XML directory listing.
  @@ -61,9 +62,9 @@
    *
    * @author <a href="mailto:fumagalli@exoffice.com">Pierpaolo Fumagalli</a>
    *         (Apache Software Foundation, Exoffice Technologies)
  - * @version CVS $Revision: 1.1.2.17 $ $Date: 2001/02/12 14:17:32 $ */
  + * @version CVS $Revision: 1.1.2.18 $ $Date: 2001/02/19 15:58:08 $ */
   
  -public class DirectoryGenerator extends ComposerGenerator implements Poolable {
  +public class DirectoryGenerator extends ComposerGenerator implements PoolClient {
   
       /** The URI of the namespace of this generator. */
       protected static final String URI =
  @@ -88,6 +89,16 @@
       protected int depth;
       protected AttributesImpl attributes = new AttributesImpl();
       protected SimpleDateFormat dateFormatter;
  +
  +    private Pool pool;
  +
  +    public void setPool(Pool pool) {
  +        this.pool = pool;
  +    }
  +
  +    public void returnToPool() {
  +        this.pool.put(this);
  +    }
   
       /**
        * Set the request parameters. Must be called before the generate
  
  
  
  1.1.2.18  +3 -3      xml-cocoon/src/org/apache/cocoon/generation/Attic/FileGenerator.java
  
  Index: FileGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/generation/Attic/FileGenerator.java,v
  retrieving revision 1.1.2.17
  retrieving revision 1.1.2.18
  diff -u -r1.1.2.17 -r1.1.2.18
  --- FileGenerator.java	2001/02/15 00:59:06	1.1.2.17
  +++ FileGenerator.java	2001/02/19 15:58:08	1.1.2.18
  @@ -7,7 +7,7 @@
    *****************************************************************************/
   package org.apache.cocoon.generation;
   
  -import org.apache.avalon.Poolable;
  +import org.apache.avalon.ThreadSafe;
   import java.io.IOException;
   import java.io.File;
   import java.io.ByteArrayInputStream;
  @@ -57,9 +57,9 @@
    * @author <a href="mailto:fumagalli@exoffice.com">Pierpaolo Fumagalli</a>
    *         (Apache Software Foundation, Exoffice Technologies)
    * @author <a href="mailto:cziegeler@sundn.de">Carsten Ziegeler</a>
  - * @version CVS $Revision: 1.1.2.17 $ $Date: 2001/02/15 00:59:06 $
  + * @version CVS $Revision: 1.1.2.18 $ $Date: 2001/02/19 15:58:08 $
    */
  -public class FileGenerator extends ComposerGenerator implements Poolable, Configurable
{
  +public class FileGenerator extends ComposerGenerator implements ThreadSafe, Configurable
{
   
       /** The store service instance */
       private Store store = null;
  
  
  
  1.1.2.3   +11 -11    xml-cocoon/src/org/apache/cocoon/generation/Attic/FragmentExtractorGenerator.java
  
  Index: FragmentExtractorGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/generation/Attic/FragmentExtractorGenerator.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- FragmentExtractorGenerator.java	2001/02/12 14:17:33	1.1.2.2
  +++ FragmentExtractorGenerator.java	2001/02/19 15:58:08	1.1.2.3
  @@ -5,7 +5,7 @@
   import org.apache.cocoon.generation.AbstractGenerator;
   import org.apache.cocoon.xml.dom.DOMStreamer;
   import org.apache.avalon.Parameters;
  -import org.apache.avalon.Poolable;
  +import org.apache.avalon.ThreadSafe;
   
   import org.xml.sax.EntityResolver;
   import org.xml.sax.SAXException;
  @@ -28,14 +28,14 @@
    * This is by no means complete yet, but it should prove useful, particularly
    * for offline generation.
    * @author <a href="mailto:paul@luminas.co.uk">Paul Russell</a>
  - * @version CVS $Revision: 1.1.2.2 $ $Date: 2001/02/12 14:17:33 $
  + * @version CVS $Revision: 1.1.2.3 $ $Date: 2001/02/19 15:58:08 $
    */
  -public class FragmentExtractorGenerator extends AbstractGenerator implements Poolable {
  -    
  +public class FragmentExtractorGenerator extends AbstractGenerator implements ThreadSafe
{
  +
       /** The fragment store. */
       private static Map fragmentStore;
  -    
  -    /** Construct a new <code>FragmentExtractorGenerator</code> and ensure
that the 
  +
  +    /** Construct a new <code>FragmentExtractorGenerator</code> and ensure
that the
        * fragment store is initialized and threadsafe (since it is a global store, not
        * per-instance.
        */
  @@ -46,26 +46,26 @@
               }
           }
       }
  -    
  +
       public void setup(EntityResolver resolver, Map objectModel, String src, Parameters
par)
           throws ProcessingException, SAXException, IOException {
           super.setup(resolver,objectModel,src,par);
           if ( fragmentStore.get(source) == null ) {
  -            throw new ResourceNotFoundException("Could not find fragment " + source + ".");

  +            throw new ResourceNotFoundException("Could not find fragment " + source + ".");
           }
   
       }
  -    
  +
       public void generate() throws SAXException {
           // Obtain the fragmentID  (which is simply the filename portion of the source)
           getLogger().debug("FragmentExtractorGenerator retrieving document " + source +
".");
           Document doc = (Document) fragmentStore.get(source);
           DOMStreamer streamer = new DOMStreamer(this.contentHandler,this.lexicalHandler);
  -        
  +
           streamer.stream(doc);
           fragmentStore.remove(source);
       }
  -    
  +
       public static String store(Document doc) {
           String id = (new UID()).toString();
           fragmentStore.put(id,doc);
  
  
  
  1.1.2.10  +3 -3      xml-cocoon/src/org/apache/cocoon/generation/Attic/HTMLGenerator.java
  
  Index: HTMLGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/generation/Attic/HTMLGenerator.java,v
  retrieving revision 1.1.2.9
  retrieving revision 1.1.2.10
  diff -u -r1.1.2.9 -r1.1.2.10
  --- HTMLGenerator.java	2001/02/13 12:02:47	1.1.2.9
  +++ HTMLGenerator.java	2001/02/19 15:58:08	1.1.2.10
  @@ -7,7 +7,7 @@
    *****************************************************************************/
   package org.apache.cocoon.generation;
   
  -import org.apache.avalon.Poolable;
  +import org.apache.avalon.ThreadSafe;
   import org.apache.cocoon.components.parser.Parser;
   import org.apache.cocoon.components.url.URLFactory;
   import org.apache.cocoon.ProcessingException;
  @@ -29,9 +29,9 @@
   
   /**
    * @author <a href="mailto:dims@yahoo.com">Davanum Srinivas</a>
  - * @version CVS $Revision: 1.1.2.9 $ $Date: 2001/02/13 12:02:47 $
  + * @version CVS $Revision: 1.1.2.10 $ $Date: 2001/02/19 15:58:08 $
    */
  -public class HTMLGenerator extends ComposerGenerator implements Poolable {
  +public class HTMLGenerator extends ComposerGenerator implements ThreadSafe {
       /**
        * Generate XML data.
        */
  
  
  
  1.1.2.7   +2 -4      xml-cocoon/src/org/apache/cocoon/generation/Attic/ImageDirectoryGenerator.java
  
  Index: ImageDirectoryGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/generation/Attic/ImageDirectoryGenerator.java,v
  retrieving revision 1.1.2.6
  retrieving revision 1.1.2.7
  diff -u -r1.1.2.6 -r1.1.2.7
  --- ImageDirectoryGenerator.java	2001/02/12 14:17:35	1.1.2.6
  +++ ImageDirectoryGenerator.java	2001/02/19 15:58:08	1.1.2.7
  @@ -4,8 +4,6 @@
   import java.util.*;
   import org.xml.sax.SAXException;
   
  -import org.apache.avalon.Poolable;
  -
   import org.apache.log.LogKit;
   
   /**
  @@ -13,9 +11,9 @@
    * files.
    *
    * @author <a href="mailto:balld@webslingerZ.com">Donald A. Ball Jr.</a>
  - * @version $Revision: 1.1.2.6 $ $Date: 2001/02/12 14:17:35 $
  + * @version $Revision: 1.1.2.7 $ $Date: 2001/02/19 15:58:08 $
    */
  -public class ImageDirectoryGenerator extends DirectoryGenerator implements Poolable {
  +public class ImageDirectoryGenerator extends DirectoryGenerator {
   
       protected static String IMAGE_WIDTH_ATTR_NAME = "width";
       protected static String IMAGE_HEIGHT_ATTR_NAME = "height";
  
  
  
  1.1.2.12  +3 -3      xml-cocoon/src/org/apache/cocoon/generation/Attic/PhpGenerator.java
  
  Index: PhpGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/generation/Attic/PhpGenerator.java,v
  retrieving revision 1.1.2.11
  retrieving revision 1.1.2.12
  diff -u -r1.1.2.11 -r1.1.2.12
  --- PhpGenerator.java	2000/12/08 20:39:38	1.1.2.11
  +++ PhpGenerator.java	2001/02/19 15:58:08	1.1.2.12
  @@ -17,7 +17,7 @@
   
   import org.apache.cocoon.components.parser.Parser;
   
  -import org.apache.avalon.Poolable;
  +import org.apache.avalon.ThreadSafe;
   
   import org.xml.sax.InputSource;
   import org.xml.sax.SAXException;
  @@ -28,9 +28,9 @@
    * results into SAX events.
    *
    * @author <a href="mailto:rubys@us.ibm.com">Sam Ruby</a>
  - * @version CVS $Revision: 1.1.2.11 $ $Date: 2000/12/08 20:39:38 $
  + * @version CVS $Revision: 1.1.2.12 $ $Date: 2001/02/19 15:58:08 $
    */
  -public class PhpGenerator extends ServletGenerator implements Poolable {
  +public class PhpGenerator extends ServletGenerator implements ThreadSafe {
   
       /**
        * Stub implementation of Servlet Config
  
  
  
  1.1.2.7   +3 -3      xml-cocoon/src/org/apache/cocoon/generation/Attic/RequestGenerator.java
  
  Index: RequestGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/generation/Attic/RequestGenerator.java,v
  retrieving revision 1.1.2.6
  retrieving revision 1.1.2.7
  diff -u -r1.1.2.6 -r1.1.2.7
  --- RequestGenerator.java	2001/02/16 22:07:38	1.1.2.6
  +++ RequestGenerator.java	2001/02/19 15:58:08	1.1.2.7
  @@ -13,16 +13,16 @@
   import org.xml.sax.SAXException;
   import org.xml.sax.helpers.AttributesImpl;
   
  -import org.apache.avalon.Poolable;
  +import org.apache.avalon.ThreadSafe;
   
   /**
    *
    * @author <a href="mailto:fumagalli@exoffice.com">Pierpaolo Fumagalli</a>
    *         (Apache Software Foundation, Exoffice Technologies)
    * @author <a href="mailto:Giacomo.Pati@pwr.ch">Giacomo Pati</a>
  - * @version CVS $Revision: 1.1.2.6 $ $Date: 2001/02/16 22:07:38 $
  + * @version CVS $Revision: 1.1.2.7 $ $Date: 2001/02/19 15:58:08 $
    */
  -public class RequestGenerator extends ServletGenerator implements Poolable {
  +public class RequestGenerator extends ServletGenerator implements ThreadSafe {
   
       /** The URI of the namespace of this generator. */
       private String URI="http://xml.apache.org/cocoon/2.0/RequestGenerator";
  
  
  
  1.1.2.9   +13 -3     xml-cocoon/src/org/apache/cocoon/generation/Attic/StatusGenerator.java
  
  Index: StatusGenerator.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/generation/Attic/StatusGenerator.java,v
  retrieving revision 1.1.2.8
  retrieving revision 1.1.2.9
  diff -u -r1.1.2.8 -r1.1.2.9
  --- StatusGenerator.java	2001/02/12 14:17:36	1.1.2.8
  +++ StatusGenerator.java	2001/02/19 15:58:08	1.1.2.9
  @@ -23,7 +23,8 @@
   import org.xml.sax.Attributes;
   import org.xml.sax.ContentHandler;
   
  -import org.apache.avalon.Poolable;
  +import org.apache.avalon.util.pool.Pool;
  +import org.apache.cocoon.PoolClient;
   
   
   /** Generates an XML representation of the current status of Cocoon.
  @@ -52,9 +53,10 @@
    *
    * @author <a href="mailto:paul@luminas.co.uk">Paul Russell</a> (Luminas Limited)
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
  - * @version CVS $Revision: 1.1.2.8 $ $Date: 2001/02/12 14:17:36 $
  + * @version CVS $Revision: 1.1.2.9 $ $Date: 2001/02/19 15:58:08 $
    */
  -public class StatusGenerator extends ComposerGenerator implements Poolable {
  +public class StatusGenerator extends ComposerGenerator implements PoolClient {
  +    private Pool pool;
   
       /** The XML namespace for the output document.
        */
  @@ -65,6 +67,14 @@
        */
       protected static final String xlinkNamespace =
           "http://www.w3.org/1999/xlink";
  +
  +    public void setPool(Pool pool) {
  +        this.pool = pool;
  +    }
  +
  +    public void returnToPool() {
  +        this.pool.put(this);
  +    }
   
       /** Generate the status information in XML format.
        * @throws SAXException
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.8   +3 -12     xml-cocoon/src/org/apache/cocoon/reading/Attic/AbstractReader.java
  
  Index: AbstractReader.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/reading/Attic/AbstractReader.java,v
  retrieving revision 1.1.2.7
  retrieving revision 1.1.2.8
  diff -u -r1.1.2.7 -r1.1.2.8
  --- AbstractReader.java	2001/01/22 21:56:47	1.1.2.7
  +++ AbstractReader.java	2001/02/19 15:58:09	1.1.2.8
  @@ -14,17 +14,14 @@
   
   import org.xml.sax.EntityResolver;
   
  -import org.apache.log.Logger;
  -import org.apache.avalon.Loggable;
  +import org.apache.avalon.AbstractLoggable;
   
   /**
    *
    * @author <a href="mailto:Giacomo.Pati@pwr.ch">Giacomo Pati</a>
  - * @version CVS $Revision: 1.1.2.7 $ $Date: 2001/01/22 21:56:47 $
  + * @version CVS $Revision: 1.1.2.8 $ $Date: 2001/02/19 15:58:09 $
    */
  -public abstract class AbstractReader implements Reader, Loggable {
  -    /** The logger */
  -    protected Logger log;
  +public abstract class AbstractReader extends AbstractLoggable implements Reader {
       /** The current <code>EntityResolver</code>. */
       protected EntityResolver resolver=null;
       /** The current <code>Map</code> of the object model. */
  @@ -45,12 +42,6 @@
           this.objectModel=objectModel;
           this.source=src;
           this.parameters=par;
  -    }
  -
  -    public void setLogger(Logger logger) {
  -        if (this.log == null) {
  -            this.log = logger;
  -        }
       }
   
       /**
  
  
  
  1.1.2.15  +7 -6      xml-cocoon/src/org/apache/cocoon/reading/Attic/ResourceReader.java
  
  Index: ResourceReader.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/reading/Attic/ResourceReader.java,v
  retrieving revision 1.1.2.14
  retrieving revision 1.1.2.15
  diff -u -r1.1.2.14 -r1.1.2.15
  --- ResourceReader.java	2001/02/15 20:29:50	1.1.2.14
  +++ ResourceReader.java	2001/02/19 15:58:09	1.1.2.15
  @@ -30,13 +30,14 @@
   
   import org.apache.avalon.ComponentManager;
   import org.apache.avalon.Composer;
  +import org.apache.avalon.ThreadSafe;
   
   import org.xml.sax.SAXException;
   
   /**
    *
    * @author <a href="mailto:Giacomo.Pati@pwr.ch">Giacomo Pati</a>
  - * @version CVS $Revision: 1.1.2.14 $ $Date: 2001/02/15 20:29:50 $
  + * @version CVS $Revision: 1.1.2.15 $ $Date: 2001/02/19 15:58:09 $
    *
    * The <code>ResourceReader</code> component is used to serve binary data
    * in a sitemap pipeline. It makes use of HTTP Headers to determine if
  @@ -52,7 +53,7 @@
    *       </dd>
    *   </dl>
    */
  -public class ResourceReader extends AbstractReader implements Composer {
  +public class ResourceReader extends AbstractReader implements Composer, ThreadSafe {
   
       private ComponentManager manager;
   
  @@ -71,7 +72,7 @@
           try {
               urlFactory = (URLFactory)manager.lookup(Roles.URL_FACTORY);
           } catch (Exception e) {
  -            log.error("cannot obtain the URLFactory", e);
  +            getLogger().error("cannot obtain the URLFactory", e);
               throw new ProcessingException ("cannot obtain the URLFactory");
           }
   
  @@ -108,11 +109,11 @@
                   is = new FileInputStream (file);
               }
           } catch (SAXException se) {
  -            log.error("ResourceReader: error resolving source \"" + source + "\"", se);
  +            getLogger().error("ResourceReader: error resolving source \"" + source + "\"",
se);
               throw new ResourceNotFoundException ("ResourceReader: error resolving source
\""
                   +source+"\". ", se);
           } catch (MalformedURLException mue) {
  -            log.error("ResourceReader: malformed source \"" + source + "\"", mue);
  +            getLogger().error("ResourceReader: malformed source \"" + source + "\"", mue);
               throw new ResourceNotFoundException ("ResourceReader: malformed source \""
                   +src+"\". ", mue);
           }
  @@ -137,7 +138,7 @@
           if (if_modified_since >= lastModified) {
               res.setStatus(HttpServletResponse.SC_NOT_MODIFIED);
           }
  -        log.debug("ResourceReader: resource has " + ((if_modified_since < lastModified)
? "" : "not ") + "been modified");
  +        getLogger().debug("ResourceReader: resource has " + ((if_modified_since < lastModified)
? "" : "not ") + "been modified");
           return (if_modified_since < lastModified);
       }
   
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.12  +14 -3     xml-cocoon/src/org/apache/cocoon/serialization/Attic/FOPSerializer.java
  
  Index: FOPSerializer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/serialization/Attic/FOPSerializer.java,v
  retrieving revision 1.1.2.11
  retrieving revision 1.1.2.12
  diff -u -r1.1.2.11 -r1.1.2.12
  --- FOPSerializer.java	2001/02/12 14:17:39	1.1.2.11
  +++ FOPSerializer.java	2001/02/19 15:58:09	1.1.2.12
  @@ -12,7 +12,8 @@
   import java.io.OutputStream;
   import java.io.PrintWriter;
   
  -import org.apache.avalon.Poolable;
  +import org.apache.avalon.util.pool.Pool;
  +import org.apache.cocoon.PoolClient;
   import org.apache.fop.apps.Driver;
   import org.apache.fop.apps.FOPException;
   import org.apache.fop.apps.Version;
  @@ -29,15 +30,25 @@
    * @author <a href="mailto:giacomo.pati@pwr.ch">Giacomo Pati</a>
    *         (PWR Organisation &amp; Entwicklung)
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
  - * @version CVS $Revision: 1.1.2.11 $ $Date: 2001/02/12 14:17:39 $
  + * @version CVS $Revision: 1.1.2.12 $ $Date: 2001/02/19 15:58:09 $
    *
    */
  -public class FOPSerializer extends AbstractSerializer implements MessageListener, Poolable
{
  +public class FOPSerializer extends AbstractSerializer implements MessageListener, PoolClient
{
   
       /**
        * The FOP driver
        */
       private Driver driver = null;
  +
  +    private Pool pool;
  +
  +    public void setPool(Pool pool) {
  +        this.pool = pool;
  +    }
  +
  +    public void returnToPool() {
  +        this.pool.put(this);
  +    }
   
       /**
        * Create the FOP driver
  
  
  
  1.1.2.12  +14 -3     xml-cocoon/src/org/apache/cocoon/serialization/Attic/HTMLSerializer.java
  
  Index: HTMLSerializer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/serialization/Attic/HTMLSerializer.java,v
  retrieving revision 1.1.2.11
  retrieving revision 1.1.2.12
  diff -u -r1.1.2.11 -r1.1.2.12
  --- HTMLSerializer.java	2001/02/12 14:17:39	1.1.2.11
  +++ HTMLSerializer.java	2001/02/19 15:58:10	1.1.2.12
  @@ -14,18 +14,29 @@
   import org.apache.xml.serialize.Method;
   import org.apache.xml.serialize.OutputFormat;
   
  -import org.apache.avalon.Poolable;
  +import org.apache.avalon.util.pool.Pool;
   import org.apache.avalon.Configuration;
   import org.apache.avalon.ConfigurationException;
  +import org.apache.cocoon.PoolClient;
   
   /**
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
  - * @version CVS $Revision: 1.1.2.11 $ $Date: 2001/02/12 14:17:39 $
  + * @version CVS $Revision: 1.1.2.12 $ $Date: 2001/02/19 15:58:10 $
    */
   
  -public class HTMLSerializer extends AbstractTextSerializer implements Poolable {
  +public class HTMLSerializer extends AbstractTextSerializer implements PoolClient {
   
       private SerializerFactory factory;
  +
  +    private Pool pool;
  +
  +    public void setPool(Pool pool) {
  +        this.pool = pool;
  +    }
  +
  +    public void returnToPool() {
  +        this.pool.put(this);
  +    }
   
       public HTMLSerializer() {
           this.factory = SerializerFactory.getSerializerFactory(Method.HTML);
  
  
  
  1.1.2.6   +14 -2     xml-cocoon/src/org/apache/cocoon/serialization/Attic/LinkSerializer.java
  
  Index: LinkSerializer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/serialization/Attic/LinkSerializer.java,v
  retrieving revision 1.1.2.5
  retrieving revision 1.1.2.6
  diff -u -r1.1.2.5 -r1.1.2.6
  --- LinkSerializer.java	2001/02/15 20:30:08	1.1.2.5
  +++ LinkSerializer.java	2001/02/19 15:58:10	1.1.2.6
  @@ -13,6 +13,8 @@
   import java.io.IOException;
   
   import org.apache.cocoon.Constants;
  +import org.apache.cocoon.PoolClient;
  +import org.apache.avalon.util.pool.Pool;
   
   import org.xml.sax.Attributes;
   import org.xml.sax.SAXException;
  @@ -21,12 +23,22 @@
   
   /**
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
  - * @version CVS $Revision: 1.1.2.5 $ $Date: 2001/02/15 20:30:08 $
  + * @version CVS $Revision: 1.1.2.6 $ $Date: 2001/02/19 15:58:10 $
    */
   
  -public class LinkSerializer extends ExtendedXLinkPipe implements Serializer {
  +public class LinkSerializer extends ExtendedXLinkPipe implements Serializer, PoolClient
{
   
       private PrintStream out;
  +
  +    private Pool pool;
  +
  +    public void setPool(Pool pool) {
  +        this.pool = pool;
  +    }
  +
  +    public void returnToPool() {
  +        this.pool.put(this);
  +    }
   
       /**
        * Set the <code>OutputStream</code> where the requested resource should
  
  
  
  1.1.2.23  +13 -2     xml-cocoon/src/org/apache/cocoon/serialization/Attic/SVGSerializer.java
  
  Index: SVGSerializer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/serialization/Attic/SVGSerializer.java,v
  retrieving revision 1.1.2.22
  retrieving revision 1.1.2.23
  diff -u -r1.1.2.22 -r1.1.2.23
  --- SVGSerializer.java	2001/02/16 22:07:42	1.1.2.22
  +++ SVGSerializer.java	2001/02/19 15:58:10	1.1.2.23
  @@ -14,6 +14,7 @@
   import org.apache.cocoon.xml.*;
   import org.apache.cocoon.xml.dom.*;
   import org.apache.avalon.*;
  +import org.apache.avalon.util.pool.Pool;
   import java.io.*;
   import java.awt.*;
   import java.awt.image.*;
  @@ -37,9 +38,19 @@
    * A Batik based Serializer for generating PNG/JPG images
    *
    * @author <a href="mailto:dims@yahoo.com">Davanum Srinivas</a>
  - * @version CVS $Revision: 1.1.2.22 $ $Date: 2001/02/16 22:07:42 $
  + * @version CVS $Revision: 1.1.2.23 $ $Date: 2001/02/19 15:58:10 $
    */
  -public class SVGSerializer extends SVGBuilder implements Composer, Serializer, Configurable
{
  +public class SVGSerializer extends SVGBuilder implements Composer, Serializer, Configurable,
PoolClient {
  +
  +    private Pool pool;
  +
  +    public void setPool(Pool pool) {
  +        this.pool = pool;
  +    }
  +
  +    public void returnToPool() {
  +        this.pool.put(this);
  +    }
   
       /** The <code>ContentHandler</code> receiving SAX events. */
       private ContentHandler contentHandler=null;
  
  
  
  1.1.2.8   +14 -3     xml-cocoon/src/org/apache/cocoon/serialization/Attic/TextSerializer.java
  
  Index: TextSerializer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/serialization/Attic/TextSerializer.java,v
  retrieving revision 1.1.2.7
  retrieving revision 1.1.2.8
  diff -u -r1.1.2.7 -r1.1.2.8
  --- TextSerializer.java	2001/02/12 14:17:40	1.1.2.7
  +++ TextSerializer.java	2001/02/19 15:58:10	1.1.2.8
  @@ -14,18 +14,29 @@
   import org.apache.xml.serialize.Method;
   import org.apache.xml.serialize.OutputFormat;
   
  -import org.apache.avalon.Poolable;
  +import org.apache.avalon.util.pool.Pool;
   import org.apache.avalon.Configuration;
   import org.apache.avalon.ConfigurationException;
  +import org.apache.cocoon.PoolClient;
   
   /**
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
  - * @version CVS $Revision: 1.1.2.7 $ $Date: 2001/02/12 14:17:40 $
  + * @version CVS $Revision: 1.1.2.8 $ $Date: 2001/02/19 15:58:10 $
    */
   
  -public class TextSerializer extends AbstractTextSerializer implements Poolable {
  +public class TextSerializer extends AbstractTextSerializer implements PoolClient {
   
       private SerializerFactory factory;
  +
  +    private Pool pool;
  +
  +    public void setPool(Pool pool) {
  +        this.pool = pool;
  +    }
  +
  +    public void returnToPool() {
  +        this.pool.put(this);
  +    }
   
       public TextSerializer() {
           this.factory = SerializerFactory.getSerializerFactory(Method.TEXT);
  
  
  
  1.1.2.12  +14 -3     xml-cocoon/src/org/apache/cocoon/serialization/Attic/XMLSerializer.java
  
  Index: XMLSerializer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/serialization/Attic/XMLSerializer.java,v
  retrieving revision 1.1.2.11
  retrieving revision 1.1.2.12
  diff -u -r1.1.2.11 -r1.1.2.12
  --- XMLSerializer.java	2001/02/12 14:17:40	1.1.2.11
  +++ XMLSerializer.java	2001/02/19 15:58:10	1.1.2.12
  @@ -14,18 +14,29 @@
   import org.apache.xml.serialize.Method;
   import org.apache.xml.serialize.OutputFormat;
   
  -import org.apache.avalon.Poolable;
  +import org.apache.avalon.util.pool.Pool;
   import org.apache.avalon.Configuration;
   import org.apache.avalon.ConfigurationException;
  +import org.apache.cocoon.PoolClient;
   
   /**
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
  - * @version CVS $Revision: 1.1.2.11 $ $Date: 2001/02/12 14:17:40 $
  + * @version CVS $Revision: 1.1.2.12 $ $Date: 2001/02/19 15:58:10 $
    */
   
  -public class XMLSerializer extends AbstractTextSerializer implements Poolable {
  +public class XMLSerializer extends AbstractTextSerializer implements PoolClient {
   
       private SerializerFactory factory;
  +
  +    private Pool pool;
  +
  +    public void setPool(Pool pool) {
  +        this.pool = pool;
  +    }
  +
  +    public void returnToPool() {
  +        this.pool.put(this);
  +    }
   
       public XMLSerializer() {
           this.factory = SerializerFactory.getSerializerFactory(Method.XML);
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.20  +3 -3      xml-cocoon/src/org/apache/cocoon/sitemap/Attic/ResourcePipeline.java
  
  Index: ResourcePipeline.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/sitemap/Attic/ResourcePipeline.java,v
  retrieving revision 1.1.2.19
  retrieving revision 1.1.2.20
  diff -u -r1.1.2.19 -r1.1.2.20
  --- ResourcePipeline.java	2001/02/16 22:07:47	1.1.2.19
  +++ ResourcePipeline.java	2001/02/19 15:58:10	1.1.2.20
  @@ -34,7 +34,7 @@
   
   /**
    * @author <a href="mailto:Giacomo.Pati@pwr.ch">Giacomo Pati</a>
  - * @version CVS $Revision: 1.1.2.19 $ $Date: 2001/02/16 22:07:47 $
  + * @version CVS $Revision: 1.1.2.20 $ $Date: 2001/02/19 15:58:10 $
    */
   public class ResourcePipeline implements Composer {
       private Generator generator;
  @@ -197,7 +197,7 @@
               this.generator.generate();
   
               if (generator instanceof PoolClient) {
  -               ((PoolClient)reader).returnToPool();
  +               ((PoolClient)generator).returnToPool();
               }
   
               for (int j=0; j < i; j++) {
  @@ -207,7 +207,7 @@
               }
   
               if (serializer instanceof PoolClient) {
  -               ((PoolClient)reader).returnToPool();
  +               ((PoolClient)serializer).returnToPool();
               }
           }
           return true;
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.7   +11 -1     xml-cocoon/src/org/apache/cocoon/transformation/Attic/I18nTransformer.java
  
  Index: I18nTransformer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/transformation/Attic/I18nTransformer.java,v
  retrieving revision 1.1.2.6
  retrieving revision 1.1.2.7
  diff -u -r1.1.2.6 -r1.1.2.7
  --- I18nTransformer.java	2001/02/12 14:17:44	1.1.2.6
  +++ I18nTransformer.java	2001/02/19 15:58:10	1.1.2.7
  @@ -14,11 +14,13 @@
   import org.apache.cocoon.acting.LangSelect;
   import org.apache.cocoon.components.parser.Parser;
   import org.apache.cocoon.components.url.URLFactory;
  +import org.apache.cocoon.PoolClient;
   
   import org.apache.avalon.ComponentManager;
   import org.apache.avalon.Composer;
   import org.apache.avalon.Parameters;
   import org.apache.avalon.Loggable;
  +import org.apache.avalon.util.pool.Pool;
   
   import org.xml.sax.Attributes;
   import org.xml.sax.EntityResolver;
  @@ -100,7 +102,8 @@
    *
    * @author <a href="mailto:lassi.immonen@valkeus.com">Lassi Immonen</a>
    */
  -public class I18nTransformer extends AbstractTransformer implements Composer {
  +public class I18nTransformer extends AbstractTransformer implements Composer, PoolClient
{
  +    private Pool pool;
   
       protected ComponentManager manager;
   
  @@ -125,6 +128,13 @@
       protected boolean is_element = false;
       protected String lang;
   
  +    public void setPool(Pool pool) {
  +        this.pool = pool;
  +    }
  +
  +    public void returnToPool() {
  +        this.pool.put(this);
  +    }
   
       /**
        *  Uses <code>org.apache.cocoon.acting.LangSelect.getLang()</code>
  
  
  
  1.1.2.14  +13 -2     xml-cocoon/src/org/apache/cocoon/transformation/Attic/LogTransformer.java
  
  Index: LogTransformer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/transformation/Attic/LogTransformer.java,v
  retrieving revision 1.1.2.13
  retrieving revision 1.1.2.14
  diff -u -r1.1.2.13 -r1.1.2.14
  --- LogTransformer.java	2001/02/14 22:12:30	1.1.2.13
  +++ LogTransformer.java	2001/02/19 15:58:11	1.1.2.14
  @@ -8,8 +8,10 @@
   package org.apache.cocoon.transformation;
   
   import org.apache.avalon.Parameters;
  +import org.apache.avalon.util.pool.Pool;
   
   import org.apache.cocoon.ProcessingException;
  +import org.apache.cocoon.PoolClient;
   
   import org.xml.sax.Attributes;
   import org.xml.sax.Locator;
  @@ -45,10 +47,11 @@
    *
    * @author <a href="mailto:giacomo.pati@pwr.ch">Giacomo Pati</a>
    *         (PWR Organisation &amp; Entwicklung)
  - * @version CVS $Revision: 1.1.2.13 $ $Date: 2001/02/14 22:12:30 $
  + * @version CVS $Revision: 1.1.2.14 $ $Date: 2001/02/19 15:58:11 $
    *
    */
  -public class LogTransformer extends AbstractTransformer {
  +public class LogTransformer extends AbstractTransformer implements PoolClient {
  +    private Pool pool;
   
       /** Wether we are forwarding XML data or not. */
       private boolean canReset=true;
  @@ -65,6 +68,14 @@
       private boolean append = false;
   
       /** BEGIN SitemapComponent methods **/
  +
  +    public void setPool(Pool pool) {
  +        this.pool = pool;
  +    }
  +
  +    public void returnToPool() {
  +        this.pool.put(this);
  +    }
   
       public void setup(EntityResolver resolver, Map objectModel,
                         String source, Parameters parameters)
  
  
  
  1.1.2.19  +14 -2     xml-cocoon/src/org/apache/cocoon/transformation/Attic/SQLTransformer.java
  
  Index: SQLTransformer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/transformation/Attic/SQLTransformer.java,v
  retrieving revision 1.1.2.18
  retrieving revision 1.1.2.19
  diff -u -r1.1.2.18 -r1.1.2.19
  --- SQLTransformer.java	2001/02/06 15:23:41	1.1.2.18
  +++ SQLTransformer.java	2001/02/19 15:58:11	1.1.2.19
  @@ -24,8 +24,10 @@
   import org.apache.avalon.ComponentManagerException;
   import org.apache.avalon.ComponentSelector;
   import org.apache.avalon.Composer;
  +import org.apache.avalon.util.pool.Pool;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.Roles;
  +import org.apache.cocoon.PoolClient;
   import org.apache.avalon.util.datasource.DataSourceComponent;
   import org.apache.cocoon.xml.XMLConsumer;
   import org.apache.cocoon.xml.XMLProducer;
  @@ -47,10 +49,10 @@
    * @author <a href="mailto:balld@webslingerZ.com">Donald Ball</a>
    * @author <a href="mailto:giacomo.pati@pwr.ch">Giacomo Pati</a>
    *         (PWR Organisation & Entwicklung)
  - * @version CVS $Revision: 1.1.2.18 $ $Date: 2001/02/06 15:23:41 $ $Author: bloritsch $
  + * @version CVS $Revision: 1.1.2.19 $ $Date: 2001/02/19 15:58:11 $ $Author: bloritsch $
    */
   
  -public class SQLTransformer extends AbstractTransformer implements Composer, Loggable {
  +public class SQLTransformer extends AbstractTransformer implements Composer, Loggable,
PoolClient {
   
       private Logger log;
   
  @@ -103,6 +105,16 @@
       protected LexicalHandler lexical_handler;
   
       protected ComponentSelector dbSelector = null;
  +
  +    private Pool pool;
  +
  +    public void setPool(Pool pool) {
  +        this.pool = pool;
  +    }
  +
  +    public void returnToPool() {
  +        this.pool.put(this);
  +    }
   
       public void compose(ComponentManager manager) {
           try {
  
  
  
  1.1.2.7   +14 -3     xml-cocoon/src/org/apache/cocoon/transformation/Attic/TraxTransformer.java
  
  Index: TraxTransformer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/transformation/Attic/TraxTransformer.java,v
  retrieving revision 1.1.2.6
  retrieving revision 1.1.2.7
  diff -u -r1.1.2.6 -r1.1.2.7
  --- TraxTransformer.java	2001/02/15 20:30:38	1.1.2.6
  +++ TraxTransformer.java	2001/02/19 15:58:11	1.1.2.7
  @@ -25,13 +25,14 @@
   import org.apache.avalon.Composer;
   import org.apache.avalon.Configurable;
   import org.apache.avalon.Configuration;
  -import org.apache.avalon.Poolable;
  +import org.apache.avalon.util.pool.Pool;
   import org.apache.avalon.Recyclable;
   import org.apache.avalon.Parameters;
   import org.apache.avalon.Loggable;
   
   import org.apache.cocoon.Constants;
   import org.apache.cocoon.Roles;
  +import org.apache.cocoon.PoolClient;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.components.store.Store;
   import org.apache.cocoon.xml.XMLConsumer;
  @@ -58,10 +59,10 @@
    *         (Apache Software Foundation, Exoffice Technologies)
    * @author <a href="mailto:dims@yahoo.com">Davanum Srinivas</a>
    * @author <a href="mailto:cziegeler@sundn.de">Carsten Ziegeler</a>
  - * @version CVS $Revision: 1.1.2.6 $ $Date: 2001/02/15 20:30:38 $
  + * @version CVS $Revision: 1.1.2.7 $ $Date: 2001/02/19 15:58:11 $
    */
   public class TraxTransformer extends ContentHandlerWrapper
  -implements Transformer, Composer, Poolable, Recyclable, Configurable {
  +implements Transformer, Composer, PoolClient, Recyclable, Configurable {
       private static String FILE = "file:/";
   
       /** The store service instance */
  @@ -75,6 +76,16 @@
   
       /** Is the store turned on? (default is on) */
       private boolean useStore = true;
  +
  +    private Pool pool;
  +
  +    public void setPool(Pool pool) {
  +        this.pool = pool;
  +    }
  +
  +    public void returnToPool() {
  +        this.pool.put(this);
  +    }
   
       TransformerHandler getTransformerHandler(EntityResolver resolver, String xsluri)
         throws SAXException, ProcessingException, IOException, TransformerConfigurationException
  
  
  
  1.1.2.18  +15 -3     xml-cocoon/src/org/apache/cocoon/transformation/Attic/XIncludeTransformer.java
  
  Index: XIncludeTransformer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/transformation/Attic/XIncludeTransformer.java,v
  retrieving revision 1.1.2.17
  retrieving revision 1.1.2.18
  diff -u -r1.1.2.17 -r1.1.2.18
  --- XIncludeTransformer.java	2001/02/12 14:17:45	1.1.2.17
  +++ XIncludeTransformer.java	2001/02/19 15:58:11	1.1.2.18
  @@ -30,6 +30,8 @@
   import org.apache.avalon.Composer;
   import org.apache.avalon.Loggable;
   import org.apache.avalon.AbstractLoggable;
  +import org.apache.avalon.util.pool.Pool;
  +import org.apache.cocoon.PoolClient;
   import org.apache.cocoon.Roles;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.components.parser.Parser;
  @@ -47,9 +49,9 @@
    * by the SAX event FSM yet.
    *
    * @author <a href="mailto:balld@webslingerZ.com">Donald Ball</a>
  - * @version CVS $Revision: 1.1.2.17 $ $Date: 2001/02/12 14:17:45 $ $Author: bloritsch $
  + * @version CVS $Revision: 1.1.2.18 $ $Date: 2001/02/19 15:58:11 $ $Author: bloritsch $
    */
  -public class XIncludeTransformer extends AbstractTransformer implements Composer {
  +public class XIncludeTransformer extends AbstractTransformer implements Composer, PoolClient
{
   
       protected URLFactory urlFactory;
   
  @@ -81,6 +83,16 @@
   
       protected Stack xmlbase_element_name_stack = new Stack();
   
  +    private Pool pool;
  +
  +    public void setPool(Pool pool) {
  +        this.pool = pool;
  +    }
  +
  +    public void returnToPool() {
  +        this.pool.put(this);
  +    }
  +
       public void setup(EntityResolver resolver, Map objectModel,
                         String source, Parameters parameters)
               throws ProcessingException, SAXException, IOException {}
  @@ -259,7 +271,7 @@
                   }
               } else {
                   XIncludeContentHandler xinclude_handler = new XIncludeContentHandler(super.contentHandler,super.lexicalHandler);
  -		xinclude_handler.setLogger(getLogger());
  +        xinclude_handler.setLogger(getLogger());
                   parser.setContentHandler(xinclude_handler);
                   parser.setLexicalHandler(xinclude_handler);
                   parser.parse(input);
  
  
  
  1.1.2.12  +14 -2     xml-cocoon/src/org/apache/cocoon/transformation/Attic/XTTransformer.java
  
  Index: XTTransformer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/transformation/Attic/XTTransformer.java,v
  retrieving revision 1.1.2.11
  retrieving revision 1.1.2.12
  diff -u -r1.1.2.11 -r1.1.2.12
  --- XTTransformer.java	2001/02/15 20:30:42	1.1.2.11
  +++ XTTransformer.java	2001/02/19 15:58:11	1.1.2.12
  @@ -24,6 +24,7 @@
   
   import org.apache.cocoon.Constants;
   import org.apache.cocoon.Roles;
  +import org.apache.cocoon.PoolClient;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.xml.XMLConsumer;
   import org.apache.cocoon.xml.DocumentHandlerAdapter;
  @@ -66,15 +67,16 @@
   
   import org.apache.log.Logger;
   import org.apache.avalon.Loggable;
  +import org.apache.avalon.util.pool.Pool;
   
   /**
    * This Transformer use the XT processor.
    *
    * @author <a href="mailto:ssahuc@imediation.com">Sahuc Sebastien</a>
  - * @version CVS $Revision: 1.1.2.11 $ $Date: 2001/02/15 20:30:42 $
  + * @version CVS $Revision: 1.1.2.12 $ $Date: 2001/02/19 15:58:11 $
    */
   public class XTTransformer extends DocumentHandlerWrapper
  -implements Transformer, Composer, Loggable {
  +implements Transformer, Composer, Loggable, PoolClient {
       private Logger log;
   
       /** The component manager */
  @@ -88,6 +90,16 @@
   
       /**The DocumentHandler */
       private DocumentHandler docHandler = null;
  +
  +    private Pool pool;
  +
  +    public void setPool(Pool pool) {
  +        this.pool = pool;
  +    }
  +
  +    public void returnToPool() {
  +        this.pool.put(this);
  +    }
   
       public void setLogger(Logger logger) {
           if (this.log == null) {
  
  
  

Mime
View raw message