Return-Path: Delivered-To: apmail-xml-cocoon-cvs-archive@xml.apache.org Received: (qmail 93337 invoked by uid 500); 17 Dec 2002 14:53:58 -0000 Mailing-List: contact cocoon-cvs-help@xml.apache.org; run by ezmlm Precedence: bulk Reply-To: cocoon-dev@xml.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cocoon-cvs@xml.apache.org Received: (qmail 93328 invoked by uid 500); 17 Dec 2002 14:53:58 -0000 Delivered-To: apmail-xml-cocoon2-cvs@apache.org Date: 17 Dec 2002 14:53:58 -0000 Message-ID: <20021217145358.51610.qmail@icarus.apache.org> From: haul@apache.org To: xml-cocoon2-cvs@apache.org Subject: cvs commit: xml-cocoon2/src/blocks/databases/java/org/apache/cocoon/components/modules/input CollectionMetaModule.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N haul 2002/12/17 06:53:58 Modified: src/blocks/databases/java/org/apache/cocoon/components/modules/input CollectionMetaModule.java Log: Make all "meta" modules ThreadSafe Revision Changes Path 1.4 +7 -10 xml-cocoon2/src/blocks/databases/java/org/apache/cocoon/components/modules/input/CollectionMetaModule.java Index: CollectionMetaModule.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/blocks/databases/java/org/apache/cocoon/components/modules/input/CollectionMetaModule.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- CollectionMetaModule.java 17 Nov 2002 18:00:03 -0000 1.3 +++ CollectionMetaModule.java 17 Dec 2002 14:53:58 -0000 1.4 @@ -52,6 +52,7 @@ import org.apache.avalon.framework.configuration.Configuration; import org.apache.avalon.framework.configuration.ConfigurationException; +import org.apache.avalon.framework.thread.ThreadSafe; import org.apache.cocoon.util.JDBCTypeConversions; @@ -81,7 +82,7 @@ * @author Christian Haul * @version CVS $Id$ */ -public class CollectionMetaModule extends AbstractMetaModule { +public class CollectionMetaModule extends AbstractMetaModule implements ThreadSafe { protected Configuration memberConf = null; @@ -100,10 +101,8 @@ public Object getAttribute( String name, Configuration modeConf, Map objectModel ) throws ConfigurationException { - if (!this.initialized.booleanValue()) { - if (getLogger().isErrorEnabled()) - getLogger().error("Uninitialized Component! FAILING"); - return null; + if (!this.initialized) { + this.lazy_initialize(); } if (this.defaultInput == null) { if (getLogger().isWarnEnabled()) @@ -165,10 +164,8 @@ public Iterator getAttributeNames( Configuration modeConf, Map objectModel ) throws ConfigurationException { - if (!this.initialized.booleanValue()) { - if (getLogger().isErrorEnabled()) - getLogger().error("Uninitialized Component! FAILING"); - return null; + if (!this.initialized) { + this.lazy_initialize(); } if (this.defaultInput == null) { if (getLogger().isWarnEnabled()) ---------------------------------------------------------------------- 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