You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by ha...@apache.org on 2002/12/17 15:53:58 UTC

cvs commit: xml-cocoon2/src/blocks/databases/java/org/apache/cocoon/components/modules/input CollectionMetaModule.java

haul        2002/12/17 06:53:58

  Modified:    src/blocks/databases/java/org/apache/cocoon/components/modules/input
                        CollectionMetaModule.java
  Log:
    <action dev="CH" type="update">
      Make all "meta" modules ThreadSafe
    </action>
  
  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 <a href="mailto:haul@informatik.tu-darmstadt.de">Christian Haul</a>
    * @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