Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 71007 invoked from network); 9 Oct 2000 15:05:10 -0000 Received: from web117.yahoomail.com (205.180.60.91) by locus.apache.org with SMTP; 9 Oct 2000 15:05:10 -0000 Received: (qmail 19161 invoked by uid 60001); 9 Oct 2000 15:05:06 -0000 Message-ID: <20001009150506.19160.qmail@web117.yahoomail.com> Received: from [24.91.197.190] by web117.yahoomail.com; Mon, 09 Oct 2000 08:05:06 PDT Date: Mon, 9 Oct 2000 08:05:06 -0700 (PDT) From: Davanum Srinivas Reply-To: dims@yahoo.com Subject: RE: cvs commit: xml-cocoon/src/org/apache/cocoon/sitemap ThreadSa feComponentHolder.java ComponentHolderFactory.java To: cocoon-dev@xml.apache.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N Sebastien, Here's a diff which will enable you to continue working.... Index: src/org/apache/cocoon/sitemap/ComponentHolderFactory.java =================================================================== RCS file: /home/cvspublic/xml-cocoon/src/org/apache/cocoon/sitemap/Attic/ComponentHolderFactory.java,v retrieving revision 1.1.2.2 diff -r1.1.2.2 ComponentHolderFactory.java 16c16 < import org.apache.avalon.SingleThreaded; --- > //import org.apache.avalon.SingleThreaded; 30,32c30,36 < if (ClassUtils.implementsInterface (componentName, Poolable.class.getName())) { < return new PoolableComponentHolder (componentName, configuration, manager); < } else if (ClassUtils.implementsInterface (componentName, SingleThreaded.class.getName())) { --- > //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 { 34,38c38 < } else if (ClassUtils.implementsInterface (componentName, ThreadSafe.class.getName())) { < return new ThreadSafeComponentHolder (componentName, configuration, manager); < } else { < return new DefaultComponentHolder (componentName, configuration, manager); < } --- > //} Thanks, dims --- Sebastien Sahuc wrote: > 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 Giacomo Pati > > - * @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 > > __________________________________________________ Do You Yahoo!? Yahoo! Photos - 35mm Quality Prints, Now Get 15 Free! http://photos.yahoo.com/