cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Davanum Srinivas <d...@yahoo.com>
Subject Re: [C2] [Patch] Beginnings of component optimisation.
Date Sun, 26 Nov 2000 21:48:47 GMT
Checked in. Please cross-verify.

Thanks,
dims

--- Paul Russell <paul@luminas.co.uk> wrote:
> Hi all,
> 
> A while back, myself and a few others added support for pooling
> and threadsafe components to C2. I'm now starting the process
> of going through and marking the components as Poolable/ThreadSafe/
> SingleThreaded etc. Please find attached the first of (several)
> patches which are the beginnings of this. All of the components
> so far have been ThreadSafe (as far as I can tell), which is good
> news.
> 
> There's a *lot* more to do for this (like making Poolable
> objects return to their pools, for a start!), so all help is
> appreciated :)
> 
> 
> P.
> -- 
> Paul Russell                               <paul@luminas.co.uk>
> Technical Director,                   http://www.luminas.co.uk
> Luminas Ltd.
> > Index: src/org/apache/cocoon/CocoonComponentSelector.java
> ===================================================================
> RCS file: /home/cvspublic/xml-cocoon/src/org/apache/cocoon/Attic/CocoonComponentSelector.java,v
> retrieving revision 1.1.2.6
> diff -c -r1.1.2.6 CocoonComponentSelector.java
> *** src/org/apache/cocoon/CocoonComponentSelector.java	2000/11/17 19:59:13	1.1.2.6
> --- src/org/apache/cocoon/CocoonComponentSelector.java	2000/11/26 16:17:16
> ***************
> *** 36,42 ****
>    * @author <a href="mailto:paul@luminas.co.uk">Paul Russell</a>
>    * @version CVS $Revision: 1.1.2.6 $ $Date: 2000/11/17 19:59:13 $
>    */
> ! public class CocoonComponentSelector implements ComponentSelector, Composer {
>       protected Logger log = LogKit.getLoggerFor("cocoon");
>       /** Hashmap of all components which this ComponentManager knows about.
>        */
> --- 36,42 ----
>    * @author <a href="mailto:paul@luminas.co.uk">Paul Russell</a>
>    * @version CVS $Revision: 1.1.2.6 $ $Date: 2000/11/17 19:59:13 $
>    */
> ! public class CocoonComponentSelector implements ComponentSelector, Composer, ThreadSafe
{
>       protected Logger log = LogKit.getLoggerFor("cocoon");
>       /** Hashmap of all components which this ComponentManager knows about.
>        */
> Index: src/org/apache/cocoon/ComponentFactory.java
> ===================================================================
> RCS file: /home/cvspublic/xml-cocoon/src/org/apache/cocoon/Attic/ComponentFactory.java,v
> retrieving revision 1.1.2.2
> diff -c -r1.1.2.2 ComponentFactory.java
> *** src/org/apache/cocoon/ComponentFactory.java	2000/10/19 14:42:36	1.1.2.2
> --- src/org/apache/cocoon/ComponentFactory.java	2000/11/26 16:17:16
> ***************
> *** 15,26 ****
>   import org.apache.avalon.ComponentManager;
>   import org.apache.avalon.Configurable;
>   import org.apache.avalon.Composer;
>   
>   /** Factory for Cocoon components.
>    * @author <a href="mailto:paul@luminas.co.uk">Paul Russell</a>
>    * @version CVS $Revision: 1.1.2.2 $ $Date: 2000/10/19 14:42:36 $
>    */
> ! public class ComponentFactory implements ObjectFactory {
>   	/** The class which this <code>ComponentFactory</code>
>   	 * should create.
>   	 */
> --- 15,27 ----
>   import org.apache.avalon.ComponentManager;
>   import org.apache.avalon.Configurable;
>   import org.apache.avalon.Composer;
> + import org.apache.avalon.ThreadSafe;
>   
>   /** Factory for Cocoon components.
>    * @author <a href="mailto:paul@luminas.co.uk">Paul Russell</a>
>    * @version CVS $Revision: 1.1.2.2 $ $Date: 2000/10/19 14:42:36 $
>    */
> ! public class ComponentFactory implements ObjectFactory, ThreadSafe {
>   	/** The class which this <code>ComponentFactory</code>
>   	 * should create.
>   	 */
> Index: src/org/apache/cocoon/components/classloader/ClassLoaderManagerImpl.java
> ===================================================================
> RCS file:
>
/home/cvspublic/xml-cocoon/src/org/apache/cocoon/components/classloader/Attic/ClassLoaderManagerImpl.java,v
> retrieving revision 1.1.2.3
> diff -c -r1.1.2.3 ClassLoaderManagerImpl.java
> *** src/org/apache/cocoon/components/classloader/ClassLoaderManagerImpl.java	2000/07/29
18:30:26
> 1.1.2.3
> --- src/org/apache/cocoon/components/classloader/ClassLoaderManagerImpl.java	2000/11/26
16:17:17
> ***************
> *** 9,21 ****
>   
>   import java.io.IOException;
>   
>   /**
>    * A singleton-like implementation of <code>ClassLoaderManager</code>
>    *
>    * @author <a href="mailto:ricardo@apache.org">Ricardo Rocha</a>
>    * @version CVS $Revision: 1.1.2.3 $ $Date: 2000/07/29 18:30:26 $
>    */
> ! public class ClassLoaderManagerImpl implements ClassLoaderManager {
>     /**
>      * The single class loader instance
>      */
> --- 9,23 ----
>   
>   import java.io.IOException;
>   
> + import org.apache.avalon.ThreadSafe;
> + 
>   /**
>    * A singleton-like implementation of <code>ClassLoaderManager</code>
>    *
>    * @author <a href="mailto:ricardo@apache.org">Ricardo Rocha</a>
>    * @version CVS $Revision: 1.1.2.3 $ $Date: 2000/07/29 18:30:26 $
>    */
> ! public class ClassLoaderManagerImpl implements ClassLoaderManager, ThreadSafe {
>     /**
>      * The single class loader instance
>      */
> Index: src/org/apache/cocoon/components/image/JAIJPEGEncoder.java
> ===================================================================
> RCS file:
> /home/cvspublic/xml-cocoon/src/org/apache/cocoon/components/image/Attic/JAIJPEGEncoder.java,v
> retrieving revision 1.1.2.5
> diff -c -r1.1.2.5 JAIJPEGEncoder.java
> *** src/org/apache/cocoon/components/image/JAIJPEGEncoder.java	2000/11/10 22:38:53	1.1.2.5
> --- src/org/apache/cocoon/components/image/JAIJPEGEncoder.java	2000/11/26 16:17:17
> ***************
> *** 10,15 ****
> --- 10,16 ----
>   
>   import org.apache.avalon.*;
>   import org.apache.avalon.Parameters;
> + import org.apache.avalon.ThreadSafe;
>   import java.io.OutputStream;
>   import java.io.IOException;
>   import java.awt.image.*;
> ***************
> *** 26,32 ****
>    * @version 1.0
>    * @see Java Advanced Imaging API
>    */
> ! public class JAIJPEGEncoder implements ImageEncoder, Configurable {
>   
>       private Logger log = LogKit.getLoggerFor("cocoon");
>   
> --- 27,33 ----
>    * @version 1.0
>    * @see Java Advanced Imaging API
>    */
> ! public class JAIJPEGEncoder implements ImageEncoder, Configurable, ThreadSafe {
>   
>       private Logger log = LogKit.getLoggerFor("cocoon");
>   
> Index: src/org/apache/cocoon/components/image/JAIPNGEncoder.java
> ===================================================================
> RCS file:
> /home/cvspublic/xml-cocoon/src/org/apache/cocoon/components/image/Attic/JAIPNGEncoder.java,v
> retrieving revision 1.1.2.5
> diff -c -r1.1.2.5 JAIPNGEncoder.java
> *** src/org/apache/cocoon/components/image/JAIPNGEncoder.java	2000/11/10 22:38:53	1.1.2.5
> --- src/org/apache/cocoon/components/image/JAIPNGEncoder.java	2000/11/26 16:17:17
> ***************
> *** 10,15 ****
> --- 10,16 ----
>   
>   import org.apache.avalon.*;
>   import org.apache.avalon.Parameters;
> + import org.apache.avalon.ThreadSafe;
>   import java.io.OutputStream;
>   import java.io.IOException;
>   import java.awt.image.BufferedImage;
> ***************
> *** 27,33 ****
>    * @version 1.0
>    * @see Java Advanced Imaging API
>    */
> ! public class JAIPNGEncoder implements ImageEncoder, Configurable {
>   
>       private Logger log = LogKit.getLoggerFor("cocoon");
>   
> --- 28,34 ----
>    * @version 1.0
>    * @see Java Advanced Imaging API
>    */
> ! public class JAIPNGEncoder implements ImageEncoder, Configurable, ThreadSafe {
>   
>       private Logger log = LogKit.getLoggerFor("cocoon");
>   
> Index: src/org/apache/cocoon/components/image/JPEGEncoder.java
> ===================================================================
> RCS file:
> /home/cvspublic/xml-cocoon/src/org/apache/cocoon/components/image/Attic/JPEGEncoder.java,v
> retrieving revision 1.1.2.5
> diff -c -r1.1.2.5 JPEGEncoder.java
> *** src/org/apache/cocoon/components/image/JPEGEncoder.java	2000/11/10 22:38:53	1.1.2.5
> --- src/org/apache/cocoon/components/image/JPEGEncoder.java	2000/11/26 16:17:17
> ***************
> *** 10,15 ****
> --- 10,16 ----
>   
>   import org.apache.avalon.*;
>   import org.apache.avalon.Parameters;
> + import org.apache.avalon.ThreadSafe;
>   import java.io.OutputStream;
>   import java.io.IOException;
>   import java.awt.image.*;
> ***************
> *** 26,32 ****
>    * @version 1.0
>    * @see com.sun.image.codec.jpeg
>    */
> ! public class JPEGEncoder implements ImageEncoder, Configurable {
>   
>       private Logger log = LogKit.getLoggerFor("cocoon");
>   
> --- 27,33 ----
>    * @version 1.0
>    * @see com.sun.image.codec.jpeg
>    */
> ! public class JPEGEncoder implements ImageEncoder, Configurable, ThreadSafe {
> 
=== message truncated ===


=====
Davanum Srinivas, JNI-FAQ Manager
http://www.jGuru.com/faq/JNI

__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/

Mime
View raw message