cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sebastien Sahuc <ssa...@imediation.com>
Subject RE: cvs commit: xml-cocoon/src/org/apache/cocoon/sitemap ThreadSa feComponentHolder.java ComponentHolderFactory.java
Date Mon, 09 Oct 2000 09:48:20 GMT
Hum, sorry giacomo to bother you on that, but the singleThreaded interface
seems not to be in the avalonapi.jar.

Could you double check, please? 

Thanks,

Sebastien


> -----Original Message-----
> From: giacomo@locus.apache.org [mailto:giacomo@locus.apache.org]
> Sent: Monday, October 09, 2000 11:30 AM
> To: xml-cocoon-cvs@apache.org
> Subject: cvs commit: xml-cocoon/src/org/apache/cocoon/sitemap
> ThreadSafeComponentHolder.java ComponentHolderFactory.java
> 
> 
> giacomo     00/10/09 02:30:12
> 
>   Modified:    src/org/apache/cocoon/sitemap Tag: xml-cocoon2
>                         ComponentHolderFactory.java
>   Added:       src/org/apache/cocoon/sitemap Tag: xml-cocoon2
>                         ThreadSafeComponentHolder.java
>   Log:
>   Additional Holder class
>   
>   Revision  Changes    Path
>   No                   revision
>   
>   
>   No                   revision
>   
>   
>   1.1.2.2   +15 -10    
> xml-cocoon/src/org/apache/cocoon/sitemap/Attic/ComponentHolder
> Factory.java
>   
>   Index: ComponentHolderFactory.java
>   ===================================================================
>   RCS file: 
> /home/cvs/xml-cocoon/src/org/apache/cocoon/sitemap/Attic/Compo
> nentHolderFactory.java,v
>   retrieving revision 1.1.2.1
>   retrieving revision 1.1.2.2
>   diff -u -r1.1.2.1 -r1.1.2.2
>   --- ComponentHolderFactory.java	2000/10/08 20:58:58	1.1.2.1
>   +++ ComponentHolderFactory.java	2000/10/09 09:30:12	1.1.2.2
>   @@ -11,25 +11,30 @@
>    import org.apache.avalon.ComponentManager;
>    import org.apache.avalon.Configuration;
>    
>   -//import org.apache.avalon.Poolable;
>   -//import org.apache.avalon.Sharable;
>   +import org.apache.avalon.Poolable;
>   +import org.apache.avalon.ThreadSafe;
>   +import org.apache.avalon.SingleThreaded;
>    
>   +import org.apache.cocoon.util.ClassUtils;
>    /**
>     * This factory instantiate the corresponding 
> ComponentHolder according to the
>     * interfaces the passed component implements.
>     *
>     * @author <a href="mailto:Giacomo.Pati@pwr.ch">Giacomo Pati</a>
>   - * @version CVS $Revision: 1.1.2.1 $ $Date: 2000/10/08 20:58:58 $
>   + * @version CVS $Revision: 1.1.2.2 $ $Date: 2000/10/09 09:30:12 $
>     */
>    public class ComponentHolderFactory {
>    
>   -    public static ComponentHolder getComponentHolder 
> (String componentName, Configuration configuration, 
> ComponentManager manager) {
>   -//        if (ClassUtil.implementsInterface 
> (componentClass, Poolable)) {
>   -//            return new PoolableComponentHolder 
> (componentClass, configuration, manager);
>   -//        } else if (ClassUtil.implementsInterface 
> (componentClass, Sharable)) {
>   -//            return new SharableComponentHolder 
> (componentClass, configuration, manager);
>   -//        } else  {
>   +    public static ComponentHolder getComponentHolder 
> (String componentName, Configuration configuration, 
> ComponentManager manager)
>   +    throws Exception {
>   +        if (ClassUtils.implementsInterface (componentName, 
> Poolable.class.getName())) {
>   +            return new PoolableComponentHolder 
> (componentName, configuration, manager);
>   +        } else if (ClassUtils.implementsInterface 
> (componentName, SingleThreaded.class.getName())) {
>                return new DefaultComponentHolder 
> (componentName, configuration, manager);
>   -//        } 
>   +        } else if (ClassUtils.implementsInterface 
> (componentName, ThreadSafe.class.getName())) {
>   +            return new ThreadSafeComponentHolder 
> (componentName, configuration, manager);
>   +        } else  {
>   +            return new DefaultComponentHolder 
> (componentName, configuration, manager);
>   +        }
>        }
>    }
>   
>   
>   
>   No                   revision
>   
>   
>   No                   revision
>   
>   
>   1.1.2.1   +73 -0     
> xml-cocoon/src/org/apache/cocoon/sitemap/Attic/ThreadSafeCompo
> nentHolder.java
>   
>   
>   
>   
> 
> ----------------------------------------------------------------------
> 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
> 

Mime
View raw message