You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Sebastien Sahuc <ss...@imediation.com> on 2000/10/09 11:48:20 UTC

RE: cvs commit: xml-cocoon/src/org/apache/cocoon/sitemap ThreadSa feComponentHolder.java ComponentHolderFactory.java

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
> 

Re: cvs commit: xml-cocoon/src/org/apache/cocoon/sitemap ThreadSafeComponentHolder.java ComponentHolderFactory.java

Posted by Giacomo Pati <Gi...@pwr.ch>.
Sebastien Sahuc wrote:
> 
> Hum, sorry giacomo to bother you on that, but the singleThreaded interface
> seems not to be in the avalonapi.jar.

Oops, forgot to commit it. Sorry. I've commited it right now.

Giacomo

> 
> 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
> >

-- 
PWR GmbH, Organisation & Entwicklung      Tel:   +41 (0)1  856 2202
Giacomo Pati, CTO/CEO                     Fax:   +41 (0)1  856 2201
Hintereichenstrasse 7                     Mobil: +41 (0)78 759 7703
CH-8166 Niederweningen                    Mailto:Giacomo.Pati@pwr.ch
                                          Web:   http://www.pwr.ch