cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h...@apache.org
Subject cvs commit: xml-cocoon2/src/webapp/WEB-INF web.xml
Date Thu, 19 Dec 2002 11:24:33 GMT
haul        2002/12/19 03:24:33

  Modified:    src/java/org/apache/cocoon/components/hsqldb Tag:
                        cocoon_2_0_3_branch ServerImpl.java
               src/java/org/apache/cocoon/components/language/generator
                        Tag: cocoon_2_0_3_branch GeneratorSelector.java
                        ProgramGeneratorImpl.java
               src/java/org/apache/cocoon/components/language/markup/xsp
                        Tag: cocoon_2_0_3_branch EsqlConnection.java
                        EsqlQuery.java
               src/java/org/apache/cocoon/components/language/markup/xsp/java
                        Tag: cocoon_2_0_3_branch esql.xsl sendmail.xsl
               src/java/org/apache/cocoon/components/modules/input Tag:
                        cocoon_2_0_3_branch AbstractMetaModule.java
                        ChainMetaModule.java CollectionMetaModule.java
                        DateInputModule.java DateMetaInputModule.java
                        DefaultsMetaModule.java DigestMetaModule.java
                        HeaderAttributeModule.java InputModule.java
                        JXPathMetaModule.java MapMetaModule.java
                        NullInputModule.java RequestAttributeModule.java
                        RequestModule.java RequestParameterModule.java
                        RequestURIModule.java SessionAttributeModule.java
                        SessionModule.java SimpleMappingMetaModule.java
                        StringConstantModule.java XMLMetaModule.java
               src/java/org/apache/cocoon/components/parser Tag:
                        cocoon_2_0_3_branch JaxpParser.java
                        XercesParser.java
               src/java/org/apache/cocoon/components/pipeline Tag:
                        cocoon_2_0_3_branch CachingEventPipeline.java
                        CachingStreamPipeline.java
               src/java/org/apache/cocoon/components/saxconnector Tag:
                        cocoon_2_0_3_branch LoggingSAXConnector.java
               src/java/org/apache/cocoon/components/source Tag:
                        cocoon_2_0_3_branch SourceHandlerImpl.java
               src/java/org/apache/cocoon/components/store Tag:
                        cocoon_2_0_3_branch JispFilesystemStore.java
                        MRUMemoryStore.java StoreJanitorImpl.java
               src/java/org/apache/cocoon/components/treeprocessor Tag:
                        cocoon_2_0_3_branch DefaultTreeBuilder.java
               src/java/org/apache/cocoon/components/url Tag:
                        cocoon_2_0_3_branch URLFactoryImpl.java
               src/java/org/apache/cocoon/components/xslt Tag:
                        cocoon_2_0_3_branch XSLTProcessorImpl.java
               src/webapp/WEB-INF Tag: cocoon_2_0_3_branch web.xml
  Log:
  catch up with HEAD:
  
    <action dev="CH" type="fix" due-to-email="michael.enke@wincor-nixdorf.com"
     due-to="Michael Enke" fixes-bug="15064">
     Postgresql 7.3: LIMIT x,y no longer supported. postgresql-old limit method
     still uses LIMIT x,y while postgresql uses the LIMIT x OFFSET y syntax
     which has been used by postgresql for some time now.
    </action>
    <action dev="CH" type="fix" due-to-email="frank.ridderbusch@gmx.de"
     due-to="Frank Ridderbusch" fixes-bug="15005">
     Extension to sendmail.xsp: lists for sendmail:cc
    </action>
    <action dev="CH" type="fix" due-to-email="artur@digitalfairway.com"
     due-to="Artur Bialecki" fixes-bug="14835">
     Added container/form-encoding init-params to web.xml
    </action>
    <action dev="CH" type="fix" due-to-email="stuart.roebuck@adolos.co.uk"
     due-to="Stuart Roebuck" fixes-bug="15136">
     Fixing various inefficient logging calls.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.10.2.2  +12 -6     xml-cocoon2/src/java/org/apache/cocoon/components/hsqldb/Attic/ServerImpl.java
  
  Index: ServerImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/hsqldb/Attic/ServerImpl.java,v
  retrieving revision 1.10.2.1
  retrieving revision 1.10.2.2
  diff -u -r1.10.2.1 -r1.10.2.2
  --- ServerImpl.java	24 Jul 2002 03:38:45 -0000	1.10.2.1
  +++ ServerImpl.java	19 Dec 2002 11:24:28 -0000	1.10.2.2
  @@ -135,7 +135,9 @@
               arguments[6] = "-database";
               arguments[7] = new File(dbPath).getCanonicalPath();
               arguments[7] += File.separator + "cocoondb";
  -            getLogger().debug("database is " + arguments[7]);
  +            if (getLogger().isDebugEnabled()) {
  +                getLogger().debug("database is " + arguments[7]);
  +            }
           } catch (MalformedURLException e) {
               getLogger().error("MalformedURLException - Could not get database directory ", e);
           } catch (IOException e) {
  @@ -172,7 +174,9 @@
                   try {
                       connection.close();
                   } catch (SQLException e) {
  -                    getLogger().debug("Shutting down HSQLDB: Ignoring exception: " + e);
  +                    if (getLogger().isDebugEnabled()) {
  +                        getLogger().debug("Shutting down HSQLDB: Ignoring exception: " + e);
  +                    }
                   }
               } catch (Exception e){
                   getLogger().error("Error while shutting down HSQLDB", e);
  @@ -186,9 +190,11 @@
               started = true;
   
               try {
  -                getLogger().debug("HSQLDB Server arguments are as follows:");
  -                for(int i=0;i<8;i++) {
  -                    getLogger().debug(i + " : " + arguments[i]);
  +                if (getLogger().isDebugEnabled()) {
  +                    getLogger().debug("HSQLDB Server arguments are as follows:");
  +                    for(int i=0;i<8;i++) {
  +                        getLogger().debug(i + " : " + arguments[i]);
  +                    }
                   }
   
                   org.hsqldb.Server.main(arguments);
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.9.2.3   +10 -4     xml-cocoon2/src/java/org/apache/cocoon/components/language/generator/GeneratorSelector.java
  
  Index: GeneratorSelector.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/language/generator/GeneratorSelector.java,v
  retrieving revision 1.9.2.2
  retrieving revision 1.9.2.3
  diff -u -r1.9.2.2 -r1.9.2.3
  --- GeneratorSelector.java	28 Jun 2002 09:01:39 -0000	1.9.2.2
  +++ GeneratorSelector.java	19 Dec 2002 11:24:28 -0000	1.9.2.3
  @@ -161,7 +161,9 @@
               componentMapping.put(component, handler);
               return component;
           } catch (Exception ce) {
  -            getLogger().debug("Could not access component for hint: " + hint, ce);
  +            if (getLogger().isDebugEnabled()) {
  +                getLogger().debug("Could not access component for hint: " + hint, ce);
  +            }
               throw new ComponentException("Could not access component for hint: " + hint, ce);
           }
       }
  @@ -191,7 +193,9 @@
               }
           } catch(final Exception e) {
               // Error will be logged by caller. This is for debug only
  -            getLogger().debug("Could not set up Component for hint: " + hint, e);
  +            if (getLogger().isDebugEnabled()) {
  +                getLogger().debug("Could not set up Component for hint: " + hint, e);
  +            }
               throw e;
           }
       }
  @@ -201,7 +205,9 @@
           if (handler != null) {
               handler.dispose();
               this.classManager.reinstantiate();
  -            getLogger().debug("Removing " + handler.getClass().getName() + " for " + hint.toString());
  +            if (getLogger().isDebugEnabled()) {
  +                getLogger().debug("Removing " + handler.getClass().getName() + " for " + hint.toString());
  +            }
           }
       }
   
  
  
  
  1.15.2.5  +17 -8     xml-cocoon2/src/java/org/apache/cocoon/components/language/generator/ProgramGeneratorImpl.java
  
  Index: ProgramGeneratorImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/language/generator/ProgramGeneratorImpl.java,v
  retrieving revision 1.15.2.4
  retrieving revision 1.15.2.5
  diff -u -r1.15.2.4 -r1.15.2.5
  --- ProgramGeneratorImpl.java	21 Sep 2002 02:13:20 -0000	1.15.2.4
  +++ ProgramGeneratorImpl.java	19 Dec 2002 11:24:28 -0000	1.15.2.5
  @@ -146,9 +146,12 @@
                       String webInf = ctx.getResource("/WEB-INF").toExternalForm();
                       this.contextDir = webInf.substring(0, webInf.length() - "WEB-INF".length());
                   }
  -                getLogger().debug("Context directory is " + this.contextDir);
  +                if (getLogger().isDebugEnabled()) {
  +                    getLogger().debug("Context directory is " + this.contextDir);
  +                }
               } catch (MalformedURLException e) {
  -                getLogger().warn("Could not get context directory", e);
  +                if (getLogger().isWarnEnabled())
  +                    getLogger().warn("Could not get context directory", e);
                   this.contextDir = "";
               }
           }
  @@ -250,7 +253,8 @@
               try {
                   programInstance = (CompiledComponent)this.cache.select(normalizedName);
               } catch (Exception e) {
  -                getLogger().debug("The instance was not accessible from the internal cache. Proceeding.");
  +                if (getLogger().isDebugEnabled())
  +                    getLogger().debug("The instance was not accessible from the internal cache. Proceeding.");
               }
   
               if (programInstance == null && this.preload) {
  @@ -267,7 +271,8 @@
                       this.cache.addGenerator(newManager, normalizedName, program);
                       programInstance = (CompiledComponent)this.cache.select(normalizedName);
                   } catch (Exception e) {
  -                    getLogger().debug("The program was not preloaded");
  +                    if (getLogger().isDebugEnabled())
  +                        getLogger().debug("The program was not preloaded");
                   }
               }
   
  @@ -348,7 +353,9 @@
               } catch (Exception cme) { }
   
               // If failed, generate. This is for the first thread entering this block
  -            getLogger().debug("Creating resource " + normalizedName);
  +            if (getLogger().isDebugEnabled()) {
  +                getLogger().debug("Creating resource " + normalizedName);
  +            }
               try {
                   Program program = this.generateResource(source,
                           normalizedName, markupLanguage, programmingLanguage, resolver);
  @@ -356,7 +363,8 @@
                   // Store generated program in cache
                   this.cache.addGenerator(newManager, normalizedName, program);
               } catch (LanguageException le) {
  -                getLogger().debug("Language Exception", le);
  +                if (getLogger().isDebugEnabled())
  +                    getLogger().debug("Language Exception", le);
                   throw new ProcessingException("Language Exception", le);
               }
   
  @@ -364,7 +372,8 @@
               try {
                   programInstance = (CompiledComponent)this.cache.select(normalizedName);
               } catch (Exception cme) {
  -                getLogger().debug("Can't load ServerPage", cme);
  +                if (getLogger().isDebugEnabled())
  +                    getLogger().debug("Can't load ServerPage", cme);
                   throw new ProcessingException("Can't load ServerPage", cme);
               }
           }
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.6.2.6   +4 -1      xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/xsp/Attic/EsqlConnection.java
  
  Index: EsqlConnection.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/xsp/Attic/EsqlConnection.java,v
  retrieving revision 1.6.2.5
  retrieving revision 1.6.2.6
  diff -u -r1.6.2.5 -r1.6.2.6
  --- EsqlConnection.java	21 Nov 2002 15:06:48 -0000	1.6.2.5
  +++ EsqlConnection.java	19 Dec 2002 11:24:29 -0000	1.6.2.6
  @@ -68,6 +68,7 @@
   public class EsqlConnection implements Connection {
     public static final int LIMIT_METHOD_NOLIMIT = 0;
     public static final int LIMIT_METHOD_POSTGRESQL = 1;
  +  public static final int LIMIT_METHOD_POSTGRESQL_OLD = 4;
     public static final int LIMIT_METHOD_MYSQL = 2;
     public static final int LIMIT_METHOD_JDBC = 3;
   
  @@ -150,6 +151,8 @@
         }
       }
       else if ("postgresql".equals(method)) {
  +      limitMethod = LIMIT_METHOD_POSTGRESQL;
  +    } else if ("postgresql-old".equals(method)) {
         limitMethod = LIMIT_METHOD_POSTGRESQL;
       } else if ("mysql".equals(method)) {
         limitMethod = LIMIT_METHOD_MYSQL;
  
  
  
  1.11.2.11 +10 -1     xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/xsp/Attic/EsqlQuery.java
  
  Index: EsqlQuery.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/xsp/Attic/EsqlQuery.java,v
  retrieving revision 1.11.2.10
  retrieving revision 1.11.2.11
  diff -u -r1.11.2.10 -r1.11.2.11
  --- EsqlQuery.java	17 Nov 2002 19:10:06 -0000	1.11.2.10
  +++ EsqlQuery.java	19 Dec 2002 11:24:29 -0000	1.11.2.11
  @@ -143,6 +143,12 @@
     public String getQueryString() {
       switch(limitMethod) {
         case EsqlConnection.LIMIT_METHOD_POSTGRESQL:
  +          StringBuffer sb = new StringBuffer(query);
  +          if (maxRows > -1) sb.append(" LIMIT ").append(maxRows);
  +          if (skipRows > 0) sb.append(" OFFSET ").append(skipRows);
  +          return sb.toString();
  +
  +      case EsqlConnection.LIMIT_METHOD_POSTGRESQL_OLD:
           if (skipRows > 0) {
             if (maxRows > -1) {
               return(new StringBuffer(query).append(" LIMIT ").append(maxRows).append(",").append(skipRows).toString());
  @@ -184,6 +190,7 @@
     public PreparedStatement prepareStatement() throws SQLException {
       switch(limitMethod) {
       case EsqlConnection.LIMIT_METHOD_POSTGRESQL:
  +    case EsqlConnection.LIMIT_METHOD_POSTGRESQL_OLD:
       case EsqlConnection.LIMIT_METHOD_MYSQL:
           preparedStatement = connection.prepareStatement(getQueryString() );
           break;
  @@ -211,6 +218,7 @@
     public CallableStatement prepareCall() throws SQLException {
       switch(limitMethod) {
       case EsqlConnection.LIMIT_METHOD_POSTGRESQL:
  +    case EsqlConnection.LIMIT_METHOD_POSTGRESQL_OLD:
       case EsqlConnection.LIMIT_METHOD_MYSQL:
           preparedStatement = connection.prepareCall( getQueryString() );
           break;
  @@ -426,6 +434,7 @@
       if (skipRows > 0) {
         switch(limitMethod) {
           case EsqlConnection.LIMIT_METHOD_POSTGRESQL:
  +        case EsqlConnection.LIMIT_METHOD_POSTGRESQL_OLD:
             // in clause
             position = skipRows;
             break;
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.13.2.11 +9 -5      xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/xsp/java/Attic/esql.xsl
  
  Index: esql.xsl
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/xsp/java/Attic/esql.xsl,v
  retrieving revision 1.13.2.10
  retrieving revision 1.13.2.11
  diff -u -r1.13.2.10 -r1.13.2.11
  --- esql.xsl	17 Nov 2002 19:10:06 -0000	1.13.2.10
  +++ esql.xsl	19 Dec 2002 11:24:29 -0000	1.13.2.11
  @@ -208,7 +208,8 @@
                   try {
                     _esql_selector = (ComponentSelector) manager.lookup(DataSourceComponent.ROLE + "Selector");
                   } catch (ComponentException cme) {
  -                  getLogger().error("Could not look up the datasource component", cme);
  +                  if (getLogger().isErrorEnabled())
  +                     getLogger().error("Could not look up the datasource component", cme);
                   }
                 }
                 return _esql_selector;
  @@ -292,7 +293,8 @@
                _esql_connection.setMultipleResults(String.valueOf(<xsl:copy-of select="$allow-multiple-results"/>));
               </xsl:if>
             } catch (Exception _esql_exception_<xsl:value-of select="generate-id(.)"/>) {
  -            getLogger().error("Could not get the datasource",_esql_exception_<xsl:value-of select="generate-id(.)"/>);
  +            if (getLogger().isErrorEnabled())
  +               getLogger().error("Could not get the datasource",_esql_exception_<xsl:value-of select="generate-id(.)"/>);
               throw new RuntimeException("Could not get the datasource "+_esql_exception_<xsl:value-of select="generate-id(.)"/>);
             }
           </xsl:when>
  @@ -505,7 +507,8 @@
             _esql_query.execute();
           </xsl:otherwise>
         </xsl:choose>
  -      getLogger().debug("esql query: " + _esql_query.getQueryString());
  +      if (getLogger().isDebugEnabled())
  +         getLogger().debug("esql query: " + _esql_query.getQueryString());
   
         <xsl:call-template name="do-results"/>
   
  @@ -933,6 +936,7 @@
   
                 XSPUtil.include(__is, this.contentHandler, newParser);
             } catch (Exception e) {
  +            if (getLogger().isErrorEnabled())
                 getLogger().error("Could not include page", e);
             } finally {
                 if (newParser != null) this.manager.release((Component) newParser);
  
  
  
  1.4.2.2   +4 -4      xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/xsp/java/sendmail.xsl
  
  Index: sendmail.xsl
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/xsp/java/sendmail.xsl,v
  retrieving revision 1.4.2.1
  retrieving revision 1.4.2.2
  diff -u -r1.4.2.1 -r1.4.2.2
  --- sendmail.xsl	28 Apr 2002 19:53:57 -0000	1.4.2.1
  +++ sendmail.xsl	19 Dec 2002 11:24:29 -0000	1.4.2.2
  @@ -257,8 +257,8 @@
   
         <xsl:if test="sendmail:cc">
            if (!"null".equals(String.valueOf(<xsl:copy-of select="$cc"/>))){
  -            InternetAddress _sendmail_cc = new InternetAddress(String.valueOf(<xsl:copy-of select="$cc"/>));
  -            _sendmail_message.setRecipient(Message.RecipientType.CC,_sendmail_cc);
  +            InternetAddress [] _sendmail_cc = InternetAddress.parse(String.valueOf(<xsl:copy-of select="$cc"/>));
  +            _sendmail_message.setRecipients(Message.RecipientType.CC,_sendmail_cc);
            }
         </xsl:if>
         <xsl:if test="sendmail:bcc">
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.3.2.3   +28 -26    xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/AbstractMetaModule.java
  
  Index: AbstractMetaModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/AbstractMetaModule.java,v
  retrieving revision 1.3.2.2
  retrieving revision 1.3.2.3
  diff -u -r1.3.2.2 -r1.3.2.3
  --- AbstractMetaModule.java	16 Dec 2002 14:56:30 -0000	1.3.2.2
  +++ AbstractMetaModule.java	19 Dec 2002 11:24:29 -0000	1.3.2.3
  @@ -73,7 +73,7 @@
    * @version CVS $Id$
    */
   public abstract class AbstractMetaModule extends AbstractInputModule
  -    implements Initializable, Composable, Disposable {
  +    implements Composable, Disposable {
   
       /** The component manager instance */
       protected ComponentManager manager;
  @@ -92,7 +92,7 @@
                                                  // during configure() so why bother here...
       
       /** Is this instance initialized? */
  -    protected Boolean initialized = new Boolean(false);
  +    protected boolean initialized = false;
   
       /* Constants */
   
  @@ -116,28 +116,34 @@
   
       /**
        * Initialize the meta module with exactly one other input
  -     * module. Override this method and dispose() to keep references
  -     * to more than one module.
  +     * module. Since "meta" modules require references to components
  +     * of the same role, initialization cannot be done in initialize()
  +     * when also implementing ThreadSafe since at that point the
  +     * component selector is not yet initialized it would trigger the
  +     * creation of a new one resulting in an endless loop of
  +     * initializations. Therefore, every module needs to call this
  +     * method when it first requires access to another module if the
  +     * module itself has not been initialized. Override this method
  +     * and dispose() to keep references to more than one module.
        */
  -    public void initialize() {
  +    public synchronized void lazy_initialize() {
   
           try {
               // obtain input modules
  -            synchronized (this.initialized) {
  -                if (!this.initialized.booleanValue()) 
  -                    this.inputSelector=(ComponentSelector) this.manager.lookup(INPUT_MODULE_SELECTOR); 
  -                    if (this.inputSelector != null && this.inputSelector instanceof ThreadSafe) {
  -                        
  -                        if (this.defaultInput != null) {
  -                            this.input = obtainModule(this.defaultInput);
  -                        }
  -                        
  +            if (!this.initialized) {
  +                this.inputSelector=(ComponentSelector) this.manager.lookup(INPUT_MODULE_SELECTOR); 
  +                if (this.inputSelector != null && this.inputSelector instanceof ThreadSafe) {
  +                    
  +                    if (this.defaultInput != null) {
  +                        this.input = obtainModule(this.defaultInput);
  +                    }
  +                    
                       } else if (!(this.inputSelector instanceof ThreadSafe) ) {
                           this.manager.release(this.inputSelector);
                           this.inputSelector = null;
                       }
  -                    
  -                    this.initialized = new Boolean(true);
  +                
  +                this.initialized = true;
               }
           } catch (Exception e) {
               if (getLogger().isWarnEnabled()) 
  @@ -152,15 +158,11 @@
        */
       public void dispose() {
   
  -        if (!this.initialized.booleanValue()) 
  -            if (getLogger().isErrorEnabled()) 
  -                getLogger().error("Uninitialized Component! FAILING");
  -        else 
  -            if (this.inputSelector != null) {
  -                if (this.input != null)
  -                    this.inputSelector.release(this.input);
  -                this.manager.release(this.inputSelector);
  -            }
  +        if (this.inputSelector != null) {
  +            if (this.input != null)
  +                this.inputSelector.release(this.input);
  +            this.manager.release(this.inputSelector);
  +        }
       }
   
   
  
  
  
  1.3.2.3   +27 -39    xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/ChainMetaModule.java
  
  Index: ChainMetaModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/ChainMetaModule.java,v
  retrieving revision 1.3.2.2
  retrieving revision 1.3.2.3
  diff -u -r1.3.2.2 -r1.3.2.3
  --- ChainMetaModule.java	16 Dec 2002 14:56:30 -0000	1.3.2.2
  +++ ChainMetaModule.java	19 Dec 2002 11:24:29 -0000	1.3.2.3
  @@ -96,7 +96,7 @@
    * @author <a href="mailto:haul@informatik.tu-darmstadt.de">Christian Haul</a>
    * @version CVS $Id$
    */
  -public class ChainMetaModule extends AbstractMetaModule  {
  +public class ChainMetaModule extends AbstractMetaModule implements ThreadSafe {
   
       class ModuleHolder {
           public String name = null;
  @@ -135,26 +135,25 @@
       }
   
   
  -    public void initialize() {
  +    public synchronized void lazy_initialize() {
   
           try {
               // obtain input modules
  -            synchronized (this.initialized) {
  -                if (!this.initialized.booleanValue())
  -                    this.inputSelector=(ComponentSelector) this.manager.lookup(INPUT_MODULE_SELECTOR); 
  -                    if (this.inputSelector != null && this.inputSelector instanceof ThreadSafe) {
  -                        
  -                        for (int i=0; i<this.inputs.length; i++) {
  -                            if (this.inputs[i].name != null) 
  -                                this.inputs[i].input = obtainModule(this.inputs[i].name);
  -                        }
  -                        
  -                    } else if (!(this.inputSelector instanceof ThreadSafe) ) {
  -                        this.manager.release(this.inputSelector);
  -                        this.inputSelector = null;
  +            if (!this.initialized) {
  +                this.inputSelector=(ComponentSelector) this.manager.lookup(INPUT_MODULE_SELECTOR); 
  +                if (this.inputSelector != null && this.inputSelector instanceof ThreadSafe) {
  +                    
  +                    for (int i=0; i<this.inputs.length; i++) {
  +                        if (this.inputs[i].name != null) 
  +                            this.inputs[i].input = obtainModule(this.inputs[i].name);
                       }
                       
  -                    this.initialized = new Boolean(true);
  +                } else if (!(this.inputSelector instanceof ThreadSafe) ) {
  +                    this.manager.release(this.inputSelector);
  +                    this.inputSelector = null;
  +                }
  +                
  +                this.initialized = true;
               }
           } catch (Exception e) {
               if (getLogger().isWarnEnabled()) 
  @@ -165,20 +164,14 @@
       
       public void dispose() {
           
  -        if (!this.initialized.booleanValue()) {
  -            if (getLogger().isErrorEnabled()) {
  -                getLogger().error("Uninitialized Component! dispose() FAILING");
  -            }
  -        } else {
  -            if (this.inputSelector != null) {
  -                
  -                for (int i=0; i<this.inputs.length; i++) {
  -                    if (this.inputs[i].input != null)
  -                        this.inputSelector.release(this.inputs[i].input);
  -                }
  -                
  -                this.manager.release(this.inputSelector);
  +        if (this.inputSelector != null) {
  +            
  +            for (int i=0; i<this.inputs.length; i++) {
  +                if (this.inputs[i].input != null)
  +                    this.inputSelector.release(this.inputs[i].input);
               }
  +            
  +            this.manager.release(this.inputSelector);
           }
       }
   
  @@ -186,10 +179,8 @@
       public Object[] getAttributeValues( String attr, Configuration modeConf, Map objectModel ) 
           throws ConfigurationException {
   
  -        if (!this.initialized.booleanValue()) {
  -            if (getLogger().isErrorEnabled()) 
  -                getLogger().error("Uninitialized Component! getAttributeValues() FAILING");
  -            return null;
  +        if (!this.initialized) {
  +            this.lazy_initialize();
           }
   
           // obtain correct configuration objects
  @@ -252,11 +243,8 @@
       public Iterator getAttributeNames( Configuration modeConf, Map objectModel ) 
           throws ConfigurationException {
   
  -
  -        if (!this.initialized.booleanValue()) {
  -            if (getLogger().isErrorEnabled()) 
  -                getLogger().error("Uninitialized Component! getAttributeNames() FAILING");
  -            return null;
  +        if (!this.initialized) {
  +            this.lazy_initialize();
           }
   
           // obtain correct configuration objects
  
  
  
  1.4.4.2   +3 -3      xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/Attic/CollectionMetaModule.java
  
  Index: CollectionMetaModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/Attic/CollectionMetaModule.java,v
  retrieving revision 1.4.4.1
  retrieving revision 1.4.4.2
  diff -u -r1.4.4.1 -r1.4.4.2
  --- CollectionMetaModule.java	17 Nov 2002 19:12:49 -0000	1.4.4.1
  +++ CollectionMetaModule.java	19 Dec 2002 11:24:29 -0000	1.4.4.2
  @@ -100,7 +100,7 @@
       public Object getAttribute( String name, Configuration modeConf, Map objectModel ) 
           throws ConfigurationException {
   
  -        if (!this.initialized.booleanValue()) {
  +        if (!this.initialized) {
               if (getLogger().isErrorEnabled()) 
                   getLogger().error("Uninitialized Component! FAILING");
               return null;
  @@ -165,7 +165,7 @@
       public Iterator getAttributeNames( Configuration modeConf, Map objectModel ) 
           throws ConfigurationException {
   
  -        if (!this.initialized.booleanValue()) {
  +        if (!this.initialized) {
               if (getLogger().isErrorEnabled()) 
                   getLogger().error("Uninitialized Component! FAILING");
               return null;
  
  
  
  1.3.4.2   +4 -9      xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/DateInputModule.java
  
  Index: DateInputModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/DateInputModule.java,v
  retrieving revision 1.3.4.1
  retrieving revision 1.3.4.2
  diff -u -r1.3.4.1 -r1.3.4.2
  --- DateInputModule.java	17 Nov 2002 19:12:49 -0000	1.3.4.1
  +++ DateInputModule.java	19 Dec 2002 11:24:29 -0000	1.3.4.2
  @@ -51,17 +51,12 @@
   
   package org.apache.cocoon.components.modules.input;
   
  -import java.util.Iterator;
  -import java.util.List;
  -import java.util.LinkedList;
  -import java.util.Vector;
  -import java.util.Date;
  -import java.util.Map;
  -import java.text.SimpleDateFormat;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
  -import org.apache.avalon.framework.component.Component;
   import org.apache.avalon.framework.thread.ThreadSafe;
  +
  +import java.text.SimpleDateFormat;
  +import java.util.*;
   
   /**
    * DateInputModule returns current date, optionally formated as
  
  
  
  1.3.2.2   +8 -13     xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/DateMetaInputModule.java
  
  Index: DateMetaInputModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/DateMetaInputModule.java,v
  retrieving revision 1.3.2.1
  retrieving revision 1.3.2.2
  diff -u -r1.3.2.1 -r1.3.2.2
  --- DateMetaInputModule.java	17 Nov 2002 19:12:49 -0000	1.3.2.1
  +++ DateMetaInputModule.java	19 Dec 2002 11:24:29 -0000	1.3.2.2
  @@ -55,11 +55,10 @@
   import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.framework.thread.ThreadSafe;
   
  -import java.util.Map;
  -import java.util.Iterator;
  -
   import java.text.DateFormat;
   import java.text.SimpleDateFormat;
  +import java.util.Iterator;
  +import java.util.Map;
   
   /**
    * Parses a date string according to a given format and returns a date
  @@ -71,7 +70,7 @@
    * @author <a href="mailto:haul@informatik.tu-darmstadt.de">Christian Haul</a>
    * @version CVS $Id$
    */
  -public class DateMetaInputModule extends AbstractMetaModule {
  +public class DateMetaInputModule extends AbstractMetaModule implements ThreadSafe {
   
       private String defaultFormat = "yyyy-MM-dd";
       private DateFormat defaultFormatter = null;
  @@ -91,10 +90,8 @@
       public Object[] getAttributeValues( 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()) 
  @@ -146,10 +143,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()) 
  
  
  
  1.3.4.2   +2 -6      xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/DefaultsMetaModule.java
  
  Index: DefaultsMetaModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/DefaultsMetaModule.java,v
  retrieving revision 1.3.4.1
  retrieving revision 1.3.4.2
  diff -u -r1.3.4.1 -r1.3.4.2
  --- DefaultsMetaModule.java	17 Nov 2002 19:12:49 -0000	1.3.4.1
  +++ DefaultsMetaModule.java	19 Dec 2002 11:24:29 -0000	1.3.4.2
  @@ -55,15 +55,11 @@
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
  -import org.apache.avalon.framework.parameters.Parameters;
   import org.apache.avalon.framework.thread.ThreadSafe;
   
  -import org.apache.cocoon.components.modules.input.InputModule;
  -
  -import java.util.ArrayList;
  -import java.util.Map;
   import java.util.HashMap;
   import java.util.Iterator;
  +import java.util.Map;
   import java.util.SortedSet;
   import java.util.TreeSet;
   
  
  
  
  1.4.4.2   +11 -18    xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/DigestMetaModule.java
  
  Index: DigestMetaModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/DigestMetaModule.java,v
  retrieving revision 1.4.4.1
  retrieving revision 1.4.4.2
  diff -u -r1.4.4.1 -r1.4.4.2
  --- DigestMetaModule.java	17 Nov 2002 19:12:49 -0000	1.4.4.1
  +++ DigestMetaModule.java	19 Dec 2002 11:24:29 -0000	1.4.4.2
  @@ -55,13 +55,11 @@
   import org.apache.avalon.framework.thread.ThreadSafe;
   
   import java.net.URLEncoder;
  -
  -import java.util.Map;
  -import java.util.Iterator;
  -
   import java.security.MessageDigest;
   import java.security.NoSuchAlgorithmException;
   import java.security.NoSuchProviderException;
  +import java.util.Iterator;
  +import java.util.Map;
   
   /** Meta module that obtains values from other module and returns
    * message digest of value. Very useful for storing and checking
  @@ -74,7 +72,7 @@
    * @author <a href="mailto:haul@informatik.tu-darmstadt.de">Christian Haul</a>
    * @version CVS $Id$
    */
  -public class DigestMetaModule extends AbstractMetaModule {
  +public class DigestMetaModule extends AbstractMetaModule implements ThreadSafe {
   
       private String defaultAlgorithm = "SHA";
       private String defaultProvider = null;
  @@ -85,6 +83,7 @@
       public void configure(Configuration config) throws ConfigurationException {
   
           this.inputConf = config.getChild("input-module");
  +        this.defaultInput = this.inputConf.getAttribute("name", this.defaultInput);
           this.defaultAlgorithm = this.inputConf.getAttribute("algorithm",this.defaultAlgorithm);
           this.defaultProvider = this.inputConf.getAttribute("provider",this.defaultProvider);
           this.defaultSalt = this.inputConf.getAttribute("salt",this.defaultSalt);
  @@ -95,10 +94,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()) 
  @@ -160,10 +157,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()) 
  @@ -196,10 +191,8 @@
       public Object[] getAttributeValues( 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()) 
  
  
  
  1.2.4.2   +8 -8      xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/HeaderAttributeModule.java
  
  Index: HeaderAttributeModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/HeaderAttributeModule.java,v
  retrieving revision 1.2.4.1
  retrieving revision 1.2.4.2
  diff -u -r1.2.4.1 -r1.2.4.2
  --- HeaderAttributeModule.java	17 Nov 2002 19:12:49 -0000	1.2.4.1
  +++ HeaderAttributeModule.java	19 Dec 2002 11:24:29 -0000	1.2.4.2
  @@ -51,17 +51,17 @@
   
   package org.apache.cocoon.components.modules.input;
   
  +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.environment.ObjectModelHelper;
  +import org.apache.cocoon.environment.Request;
  +
   import java.util.Enumeration;
   import java.util.Iterator;
  -import java.util.List;
   import java.util.LinkedList;
  +import java.util.List;
   import java.util.Map;
  -import org.apache.cocoon.environment.Request;
  -import org.apache.cocoon.environment.ObjectModelHelper;
  -import org.apache.avalon.framework.configuration.Configuration;
  -import org.apache.avalon.framework.configuration.ConfigurationException;
  -import org.apache.avalon.framework.component.Component;
  -import org.apache.avalon.framework.thread.ThreadSafe;
   
   /**
    * HeaderAttributeModule accesses request header attributes. If the
  
  
  
  1.4.4.2   +4 -5      xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/InputModule.java
  
  Index: InputModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/InputModule.java,v
  retrieving revision 1.4.4.1
  retrieving revision 1.4.4.2
  diff -u -r1.4.4.1 -r1.4.4.2
  --- InputModule.java	17 Nov 2002 19:12:49 -0000	1.4.4.1
  +++ InputModule.java	19 Dec 2002 11:24:29 -0000	1.4.4.2
  @@ -51,13 +51,12 @@
   
   package org.apache.cocoon.components.modules.input;
   
  -import java.util.SortedSet;
  -import java.util.Iterator;
  -import java.util.Map;
  -
   import org.apache.avalon.framework.component.Component;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
  +
  +import java.util.Iterator;
  +import java.util.Map;
   
   /**
    * InputModule specifies an interface for components that provide
  
  
  
  1.1.2.4   +11 -3     xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/JXPathMetaModule.java
  
  Index: JXPathMetaModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/JXPathMetaModule.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- JXPathMetaModule.java	16 Dec 2002 14:56:30 -0000	1.1.2.3
  +++ JXPathMetaModule.java	19 Dec 2002 11:24:29 -0000	1.1.2.4
  @@ -54,6 +54,7 @@
   import org.apache.avalon.framework.configuration.Configurable;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
  +import org.apache.avalon.framework.thread.ThreadSafe;
   import org.apache.commons.jxpath.*;
   
   import java.util.Iterator;
  @@ -95,7 +96,7 @@
    * @author <a href="mailto:haul@apache.org">Christian Haul</a>
    * @version $Id$
    */
  -public class JXPathMetaModule extends AbstractMetaModule implements Configurable {
  +public class JXPathMetaModule extends AbstractMetaModule implements Configurable, ThreadSafe {
   
       /**
        * Contains all globally registered extension classes and
  @@ -313,6 +314,10 @@
        */
       protected  Object getContextObject(Configuration modeConf, Map objectModel) {
   
  +        if (!this.initialized) {
  +            this.lazy_initialize();
  +        }
  +
           Configuration mConf = null;
           String inputName=null;
           String parameter = this.parameter;
  @@ -323,7 +328,10 @@
           }
   
           if (getLogger().isDebugEnabled())
  -            getLogger().debug("modeConf is "+modeConf+" this.inputConf is "+this.inputConf+" mConf is "+mConf+" this.input is "+this.input+" this.defaultInput is "+this.defaultInput+" inputName is "+inputName+" parameter is "+parameter);
  +            getLogger().debug("modeConf is "+modeConf+" this.inputConf is "+this.inputConf
  +                              +" mConf is "+mConf+" this.input is "+this.input
  +                              +" this.defaultInput is "+this.defaultInput
  +                              +" inputName is "+inputName+" parameter is "+parameter);
   
           Object obj =  this.getValue(parameter, objectModel, 
                                       this.input, this.defaultInput, this.inputConf,
  
  
  
  1.1.4.2   +8 -11     xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/MapMetaModule.java
  
  Index: MapMetaModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/MapMetaModule.java,v
  retrieving revision 1.1.4.1
  retrieving revision 1.1.4.2
  diff -u -r1.1.4.1 -r1.1.4.2
  --- MapMetaModule.java	17 Nov 2002 19:12:49 -0000	1.1.4.1
  +++ MapMetaModule.java	19 Dec 2002 11:24:29 -0000	1.1.4.2
  @@ -54,8 +54,8 @@
   import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.framework.thread.ThreadSafe;
   
  -import java.util.Map;
   import java.util.Iterator;
  +import java.util.Map;
   
   /** 
    * Meta module that obtains an Object from another module, assumes
  @@ -68,7 +68,7 @@
    * @author <a href="mailto:haul@informatik.tu-darmstadt.de">Christian Haul</a>
    * @version CVS $Id$
    */
  -public class MapMetaModule extends AbstractMetaModule {
  +public class MapMetaModule extends AbstractMetaModule implements ThreadSafe {
   
       protected String objectName = null;
       protected String parameter = null;
  @@ -77,6 +77,7 @@
       public void configure(Configuration config) throws ConfigurationException {
   
           this.inputConf = config.getChild("input-module");
  +        this.defaultInput = this.inputConf.getAttribute("name", this.defaultInput);
           this.objectName = this.inputConf.getAttribute("object",this.objectName);
           this.parameter = this.inputConf.getAttribute("parameter",this.parameter);
       }
  @@ -85,10 +86,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()) 
  @@ -128,10 +127,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()) 
  
  
  
  1.2.4.2   +4 -7      xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/NullInputModule.java
  
  Index: NullInputModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/NullInputModule.java,v
  retrieving revision 1.2.4.1
  retrieving revision 1.2.4.2
  diff -u -r1.2.4.1 -r1.2.4.2
  --- NullInputModule.java	17 Nov 2002 19:12:49 -0000	1.2.4.1
  +++ NullInputModule.java	19 Dec 2002 11:24:29 -0000	1.2.4.2
  @@ -51,15 +51,12 @@
   
   package org.apache.cocoon.components.modules.input;
   
  -import java.util.Iterator;
  -import java.util.List;
  -import java.util.LinkedList;
  -import java.util.StringTokenizer;
  -import java.util.Map;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
  -import org.apache.avalon.framework.component.Component;
   import org.apache.avalon.framework.thread.ThreadSafe;
  +
  +import java.util.Iterator;
  +import java.util.Map;
   
   /**
    * NullInputModule returns a null object.  Use this if you wnat to
  
  
  
  1.2.4.2   +8 -8      xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/RequestAttributeModule.java
  
  Index: RequestAttributeModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/RequestAttributeModule.java,v
  retrieving revision 1.2.4.1
  retrieving revision 1.2.4.2
  diff -u -r1.2.4.1 -r1.2.4.2
  --- RequestAttributeModule.java	17 Nov 2002 19:12:49 -0000	1.2.4.1
  +++ RequestAttributeModule.java	19 Dec 2002 11:24:29 -0000	1.2.4.2
  @@ -51,17 +51,17 @@
   
   package org.apache.cocoon.components.modules.input;
   
  +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.environment.ObjectModelHelper;
  +import org.apache.cocoon.environment.Request;
  +
   import java.util.Enumeration;
   import java.util.Iterator;
  -import java.util.List;
   import java.util.LinkedList;
  +import java.util.List;
   import java.util.Map;
  -import org.apache.cocoon.environment.Request;
  -import org.apache.cocoon.environment.ObjectModelHelper;
  -import org.apache.avalon.framework.configuration.Configuration;
  -import org.apache.avalon.framework.configuration.ConfigurationException;
  -import org.apache.avalon.framework.component.Component;
  -import org.apache.avalon.framework.thread.ThreadSafe;
   
   /**
    * RequestAttributeModule accesses request attributes. If the
  
  
  
  1.1.2.2   +3 -4      xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/RequestModule.java
  
  Index: RequestModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/RequestModule.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- RequestModule.java	17 Nov 2002 19:12:49 -0000	1.1.2.1
  +++ RequestModule.java	19 Dec 2002 11:24:29 -0000	1.1.2.2
  @@ -51,12 +51,11 @@
   
   package org.apache.cocoon.components.modules.input;
   
  -import java.util.Map;
  -
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.thread.ThreadSafe;
  -
   import org.apache.cocoon.environment.ObjectModelHelper;
  +
  +import java.util.Map;
   
   /**
    * RequestModule provides access to Request object properties.
  
  
  
  1.2.4.2   +8 -8      xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/RequestParameterModule.java
  
  Index: RequestParameterModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/RequestParameterModule.java,v
  retrieving revision 1.2.4.1
  retrieving revision 1.2.4.2
  diff -u -r1.2.4.1 -r1.2.4.2
  --- RequestParameterModule.java	17 Nov 2002 19:12:49 -0000	1.2.4.1
  +++ RequestParameterModule.java	19 Dec 2002 11:24:29 -0000	1.2.4.2
  @@ -51,17 +51,17 @@
   
   package org.apache.cocoon.components.modules.input;
   
  +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.environment.ObjectModelHelper;
  +import org.apache.cocoon.environment.Request;
  +
   import java.util.Enumeration;
   import java.util.Iterator;
  -import java.util.List;
   import java.util.LinkedList;
  +import java.util.List;
   import java.util.Map;
  -import org.apache.cocoon.environment.Request;
  -import org.apache.cocoon.environment.ObjectModelHelper;
  -import org.apache.avalon.framework.configuration.Configuration;
  -import org.apache.avalon.framework.configuration.ConfigurationException;
  -import org.apache.avalon.framework.component.Component;
  -import org.apache.avalon.framework.thread.ThreadSafe;
   
   /**
    * RequestParameterModule accesses request parameters. If the
  
  
  
  1.2.4.2   +8 -9      xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/RequestURIModule.java
  
  Index: RequestURIModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/RequestURIModule.java,v
  retrieving revision 1.2.4.1
  retrieving revision 1.2.4.2
  diff -u -r1.2.4.1 -r1.2.4.2
  --- RequestURIModule.java	17 Nov 2002 19:12:49 -0000	1.2.4.1
  +++ RequestURIModule.java	19 Dec 2002 11:24:29 -0000	1.2.4.2
  @@ -51,17 +51,16 @@
   
   package org.apache.cocoon.components.modules.input;
   
  -import java.util.Iterator;
  -import java.util.Vector;
  -import java.util.Map;
  -import java.util.List;
  -import java.util.LinkedList;
  -import org.apache.cocoon.environment.Request;
  -import org.apache.cocoon.environment.ObjectModelHelper;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
  -import org.apache.avalon.framework.component.Component;
   import org.apache.avalon.framework.thread.ThreadSafe;
  +import org.apache.cocoon.environment.ObjectModelHelper;
  +
  +import java.util.Iterator;
  +import java.util.LinkedList;
  +import java.util.List;
  +import java.util.Map;
  +import java.util.Vector;
   
   /**
    * RequestURIModule accesses the request URI. If the
  
  
  
  1.2.4.2   +8 -9      xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/SessionAttributeModule.java
  
  Index: SessionAttributeModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/SessionAttributeModule.java,v
  retrieving revision 1.2.4.1
  retrieving revision 1.2.4.2
  diff -u -r1.2.4.1 -r1.2.4.2
  --- SessionAttributeModule.java	17 Nov 2002 19:12:49 -0000	1.2.4.1
  +++ SessionAttributeModule.java	19 Dec 2002 11:24:29 -0000	1.2.4.2
  @@ -51,18 +51,17 @@
   
   package org.apache.cocoon.components.modules.input;
   
  +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.environment.ObjectModelHelper;
  +import org.apache.cocoon.environment.Request;
  +
   import java.util.Enumeration;
   import java.util.Iterator;
  -import java.util.List;
   import java.util.LinkedList;
  +import java.util.List;
   import java.util.Map;
  -import org.apache.cocoon.environment.Request;
  -import org.apache.cocoon.environment.ObjectModelHelper;
  -import org.apache.cocoon.environment.Session;
  -import org.apache.avalon.framework.configuration.Configuration;
  -import org.apache.avalon.framework.configuration.ConfigurationException;
  -import org.apache.avalon.framework.component.Component;
  -import org.apache.avalon.framework.thread.ThreadSafe;
   
   /**
    * SessionAttributeModule accesses session attributes. If the
  
  
  
  1.1.2.2   +3 -4      xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/SessionModule.java
  
  Index: SessionModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/SessionModule.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- SessionModule.java	17 Nov 2002 19:12:49 -0000	1.1.2.1
  +++ SessionModule.java	19 Dec 2002 11:24:29 -0000	1.1.2.2
  @@ -51,12 +51,11 @@
   
   package org.apache.cocoon.components.modules.input;
   
  -import java.util.Map;
  -
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.thread.ThreadSafe;
  -
   import org.apache.cocoon.environment.ObjectModelHelper;
  +
  +import java.util.Map;
   
   /**
    * SessionModule provides access to Session object properties.
  
  
  
  1.1.2.4   +9 -14     xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/SimpleMappingMetaModule.java
  
  Index: SimpleMappingMetaModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/SimpleMappingMetaModule.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- SimpleMappingMetaModule.java	18 Dec 2002 17:45:38 -0000	1.1.2.3
  +++ SimpleMappingMetaModule.java	19 Dec 2002 11:24:29 -0000	1.1.2.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 java.util.HashMap;
   import java.util.HashSet;
  @@ -84,7 +85,7 @@
    * @author <a href="mailto:haul@informatik.tu-darmstadt.de">Christian Haul</a>
    * @version CVS $Id$
    */
  -public class SimpleMappingMetaModule extends AbstractMetaModule {
  +public class SimpleMappingMetaModule extends AbstractMetaModule implements ThreadSafe {
   
       String prefix = null;
       String suffix = null;
  @@ -155,10 +156,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()) 
  @@ -218,10 +217,8 @@
       public Object[] getAttributeValues( 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()) 
  @@ -278,10 +275,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()) 
  
  
  
  1.2.4.2   +7 -8      xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/StringConstantModule.java
  
  Index: StringConstantModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/StringConstantModule.java,v
  retrieving revision 1.2.4.1
  retrieving revision 1.2.4.2
  diff -u -r1.2.4.1 -r1.2.4.2
  --- StringConstantModule.java	17 Nov 2002 19:12:49 -0000	1.2.4.1
  +++ StringConstantModule.java	19 Dec 2002 11:24:29 -0000	1.2.4.2
  @@ -51,16 +51,15 @@
   
   package org.apache.cocoon.components.modules.input;
   
  -import java.util.Iterator;
  -import java.util.List;
  -import java.util.Vector;
  -import java.util.LinkedList;
  -import java.util.StringTokenizer;
  -import java.util.Map;
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
  -import org.apache.avalon.framework.component.Component;
   import org.apache.avalon.framework.thread.ThreadSafe;
  +
  +import java.util.Iterator;
  +import java.util.LinkedList;
  +import java.util.List;
  +import java.util.Map;
  +import java.util.Vector;
   
   /**
    * StringConstantModule returns a constant string.
  
  
  
  1.1.4.2   +8 -29     xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/XMLMetaModule.java
  
  Index: XMLMetaModule.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/modules/input/XMLMetaModule.java,v
  retrieving revision 1.1.4.1
  retrieving revision 1.1.4.2
  diff -u -r1.1.4.1 -r1.1.4.2
  --- XMLMetaModule.java	17 Nov 2002 19:12:49 -0000	1.1.4.1
  +++ XMLMetaModule.java	19 Dec 2002 11:24:29 -0000	1.1.4.2
  @@ -104,7 +104,7 @@
    * @author <a href="mailto:haul@informatik.tu-darmstadt.de">Christian Haul</a>
    * @version CVS $Id$
    */
  -public class XMLMetaModule extends AbstractMetaModule {
  +public class XMLMetaModule extends AbstractMetaModule implements ThreadSafe {
   
       protected String rootName = "root";
       protected String ignore = null;
  @@ -135,15 +135,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.defaultInput == null) {
  -            if (getLogger().isWarnEnabled()) 
  -                getLogger().warn("No input module given. FAILING");
  -            return null;
  +        if (!this.initialized) {
  +            this.lazy_initialize();
           }
   
           // obtain correct configuration objects
  @@ -209,15 +202,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.defaultInput == null) {
  -            if (getLogger().isWarnEnabled()) 
  -                getLogger().warn("No input module given. FAILING");
  -            return null;
  +         if (!this.initialized) {
  +             this.lazy_initialize();
           }
   
           return XMLMetaModule.returnNames.iterator();
  @@ -229,15 +215,8 @@
       public Object[] getAttributeValues( String name, Configuration modeConf, Map objectModel ) 
           throws ConfigurationException {
   
  -        if (!this.initialized.booleanValue()) {
  -            if (getLogger().isErrorEnabled()) 
  -                getLogger().error("Uninitialized Component! FAILING");
  -            return null;
  -        }
  -        if (this.defaultInput == null) {
  -            if (getLogger().isWarnEnabled()) 
  -                getLogger().warn("No input module given. FAILING");
  -            return null;
  +        if (!this.initialized) {
  +            this.lazy_initialize();
           }
           
           Object[] values = new Object[1];
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.9.2.1   +4 -2      xml-cocoon2/src/java/org/apache/cocoon/components/parser/JaxpParser.java
  
  Index: JaxpParser.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/parser/JaxpParser.java,v
  retrieving revision 1.9
  retrieving revision 1.9.2.1
  diff -u -r1.9 -r1.9.2.1
  --- JaxpParser.java	22 Feb 2002 07:00:10 -0000	1.9
  +++ JaxpParser.java	19 Dec 2002 11:24:31 -0000	1.9.2.1
  @@ -143,7 +143,9 @@
       throws ComponentException {
           this.manager = manager;
           if ( manager.hasComponent( Resolver.ROLE ) ) {
  -            getLogger().debug("Looking up " + Resolver.ROLE);
  +            if (getLogger().isDebugEnabled()) {
  +                getLogger().debug("Looking up " + Resolver.ROLE);
  +            }
               this.resolver = (Resolver)manager.lookup(Resolver.ROLE);
           }
       }
  
  
  
  1.8.2.1   +4 -2      xml-cocoon2/src/java/org/apache/cocoon/components/parser/XercesParser.java
  
  Index: XercesParser.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/parser/XercesParser.java,v
  retrieving revision 1.8
  retrieving revision 1.8.2.1
  diff -u -r1.8 -r1.8.2.1
  --- XercesParser.java	22 Feb 2002 07:00:10 -0000	1.8
  +++ XercesParser.java	19 Dec 2002 11:24:31 -0000	1.8.2.1
  @@ -102,7 +102,9 @@
        */
       public void compose(ComponentManager manager) throws ComponentException {
           this.manager = manager;
  -        getLogger().debug("Looking up " + Resolver.ROLE);
  +        if (getLogger().isDebugEnabled()) {
  +            getLogger().debug("Looking up " + Resolver.ROLE);
  +        }
           if ( manager.hasComponent( Resolver.ROLE ) ) {
               this.resolver = (Resolver)manager.lookup(Resolver.ROLE);
           }
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.9.2.1   +13 -5     xml-cocoon2/src/java/org/apache/cocoon/components/pipeline/Attic/CachingEventPipeline.java
  
  Index: CachingEventPipeline.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/pipeline/Attic/CachingEventPipeline.java,v
  retrieving revision 1.9
  retrieving revision 1.9.2.1
  diff -u -r1.9 -r1.9.2.1
  --- CachingEventPipeline.java	6 Apr 2002 17:57:54 -0000	1.9
  +++ CachingEventPipeline.java	19 Dec 2002 11:24:31 -0000	1.9.2.1
  @@ -184,7 +184,9 @@
                   CachedEventObject cachedObject = (CachedEventObject)this.eventCache.get(this.pipelineCacheKey);
   
                   if (cachedObject != null) {
  -                    getLogger().debug("Found cached content for '" + environment.getURI() + "'.");
  +                    if (getLogger().isDebugEnabled()) {
  +                        getLogger().debug("Found cached content for '" + environment.getURI() + "'.");
  +                    }
                       Iterator validityIterator = validityObjects.keySet().iterator();
                       ComponentCacheKey validityKey;
                       boolean valid = true;
  @@ -199,7 +201,9 @@
                           }
                       }
                       if (valid) {
  -                        getLogger().debug("Using valid cached content for '" + environment.getURI() + "'.");
  +                        if (getLogger().isDebugEnabled()) {
  +                            getLogger().debug("Using valid cached content for '" + environment.getURI() + "'.");
  +                        }
                           // get all transformers which are not cacheable
                           int transformerSize = this.transformers.size();
                           while (this.firstNotCacheableTransformerIndex < transformerSize) {
  @@ -228,14 +232,18 @@
                               this.manager.release(deserializer);
                           }
                       } else {
  -                        getLogger().debug("Cached content is invalid for '" + environment.getURI() + "'.");
  +                        if (getLogger().isDebugEnabled()) {
  +                            getLogger().debug("Cached content is invalid for '" + environment.getURI() + "'.");
  +                        }
                           // remove invalid cached object
                           this.eventCache.remove(this.pipelineCacheKey);
                           cachedObject = null;
                       }
                   }
                   if (cachedObject == null) {
  -                    getLogger().debug("Caching content for further requests of '" + environment.getURI() + "'.");
  +                    if (getLogger().isDebugEnabled()) {
  +                        getLogger().debug("Caching content for further requests of '" + environment.getURI() + "'.");
  +                    }
                       xmlSerializer = (XMLSerializer)this.manager.lookup(XMLSerializer.ROLE);
                   }
               }
  
  
  
  1.8.2.2   +25 -12    xml-cocoon2/src/java/org/apache/cocoon/components/pipeline/Attic/CachingStreamPipeline.java
  
  Index: CachingStreamPipeline.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/pipeline/Attic/CachingStreamPipeline.java,v
  retrieving revision 1.8.2.1
  retrieving revision 1.8.2.2
  diff -u -r1.8.2.1 -r1.8.2.2
  --- CachingStreamPipeline.java	5 Aug 2002 11:20:41 -0000	1.8.2.1
  +++ CachingStreamPipeline.java	19 Dec 2002 11:24:31 -0000	1.8.2.2
  @@ -193,8 +193,9 @@
                   CachedStreamObject cachedObject = (CachedStreamObject)this.streamCache.get(pcKey);
   
                   if (cachedObject != null) {
  -                    getLogger().debug("Found cached response for '" + environment.getURI() + "'.");
  -
  +                    if (getLogger().isDebugEnabled()) {
  +                        getLogger().debug("Found cached response for '" + environment.getURI() + "'.");
  +                    }
                       Iterator validityIterator = validityObjects.keySet().iterator();
                       ComponentCacheKey validityKey;
                       boolean valid = true;
  @@ -209,8 +210,9 @@
                           }
                       }
                       if (valid) {
  -                        getLogger().debug("Using valid cached content for '" + environment.getURI() + "'.");
  -
  +                        if (getLogger().isDebugEnabled()) {
  +                            getLogger().debug("Using valid cached content for '" + environment.getURI() + "'.");
  +                        }
                           byte[] response = cachedObject.getResponse();
                           if(response.length > 0) {
                               usedCache = true;
  @@ -220,15 +222,18 @@
                       }
   
                       if(!usedCache) {
  -                        getLogger().debug("Cached content is invalid for '" + environment.getURI() + "'.");
  -
  +                        if (getLogger().isDebugEnabled()) {
  +                            getLogger().debug("Cached content is invalid for '" + environment.getURI() + "'.");
  +                        }
                           // remove invalid cached object
                           this.streamCache.remove(pcKey);
                           cachedObject = null;
                       }
                   }
                   if (cachedObject == null) {
  -                    getLogger().debug("Caching content for further requests of '" + environment.getURI() + "'.");
  +                    if (getLogger().isDebugEnabled()) {
  +                        getLogger().debug("Caching content for further requests of '" + environment.getURI() + "'.");
  +                    }
                       outputStream = new CachingOutputStream(outputStream);
                   }
               }
  @@ -334,7 +339,9 @@
                           CachedStreamObject cachedObject = (CachedStreamObject)this.streamCache.get(pcKey);
   
                           if (cachedObject != null) {
  -                            getLogger().debug("Found cached response for '" + environment.getURI() + "'.");
  +                            if (getLogger().isDebugEnabled()) {
  +                                getLogger().debug("Found cached response for '" + environment.getURI() + "'.");
  +                            }
   
                               Iterator validityIterator = validityObjects.keySet().iterator();
                               ComponentCacheKey validityKey;
  @@ -350,7 +357,9 @@
                                   }
                               }
                               if (valid) {
  -                                getLogger().debug("Using valid cached content for '" + environment.getURI() + "'.");
  +                                if (getLogger().isDebugEnabled()) {
  +                                    getLogger().debug("Using valid cached content for '" + environment.getURI() + "'.");
  +                                }
                                   byte[] bytes = cachedObject.getResponse();
                                   if(bytes.length > 0) {
                                       usedCache = true;
  @@ -360,7 +369,9 @@
                               }
   
                               if (!usedCache) {
  -                                getLogger().debug("Cached content is invalid for '" + environment.getURI() + "'.");
  +                                if (getLogger().isDebugEnabled()) {
  +                                    getLogger().debug("Cached content is invalid for '" + environment.getURI() + "'.");
  +                                }
   
                                   // remove invalid cached object
                                   this.streamCache.remove(pcKey);
  @@ -368,7 +379,9 @@
                               }
                           }
                           if (cachedObject == null) {
  -                            getLogger().debug("Caching content for further requests of '" + environment.getURI() + "'.");
  +                            if (getLogger().isDebugEnabled()) {
  +                                getLogger().debug("Caching content for further requests of '" + environment.getURI() + "'.");
  +                            }
                               outputStream = new CachingOutputStream(outputStream);
                           }
                       } else {
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.4.2.2   +9 -5      xml-cocoon2/src/java/org/apache/cocoon/components/saxconnector/Attic/LoggingSAXConnector.java
  
  Index: LoggingSAXConnector.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/saxconnector/Attic/LoggingSAXConnector.java,v
  retrieving revision 1.4.2.1
  retrieving revision 1.4.2.2
  diff -u -r1.4.2.1 -r1.4.2.2
  --- LoggingSAXConnector.java	1 Jul 2002 08:04:59 -0000	1.4.2.1
  +++ LoggingSAXConnector.java	19 Dec 2002 11:24:32 -0000	1.4.2.2
  @@ -107,8 +107,10 @@
           // in case of any error we print out the xml content
           // as the endDocument() was never reached
           if (this.writer != null) {
  -            this.getLogger().debug("XMLContent before : " + super.contentHandler);
  -            this.getLogger().debug(this.writer.toString());
  +            if (getLogger().isDebugEnabled()) {
  +                this.getLogger().debug("XMLContent before : " + super.contentHandler);
  +                this.getLogger().debug(this.writer.toString());
  +            }
           }
           super.recycle();
           this.writer = null;
  @@ -131,8 +133,10 @@
           this.handler.endDocument();
           super.endDocument();
           if (this.writer != null) {
  -            this.getLogger().debug("XMLContent before : " + super.contentHandler);
  -            this.getLogger().debug(this.writer.toString());
  +            if (getLogger().isDebugEnabled()) {
  +                this.getLogger().debug("XMLContent before : " + super.contentHandler);
  +                this.getLogger().debug(this.writer.toString());
  +            }
               this.writer = null;
           }
       }
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.8.2.1   +4 -2      xml-cocoon2/src/java/org/apache/cocoon/components/source/SourceHandlerImpl.java
  
  Index: SourceHandlerImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/source/SourceHandlerImpl.java,v
  retrieving revision 1.8
  retrieving revision 1.8.2.1
  diff -u -r1.8 -r1.8.2.1
  --- SourceHandlerImpl.java	21 Mar 2002 04:51:22 -0000	1.8
  +++ SourceHandlerImpl.java	19 Dec 2002 11:24:32 -0000	1.8.2.1
  @@ -114,7 +114,9 @@
                       throw new ConfigurationException("SourceFactory defined twice for protocol: " + protocol);
                   }
   
  -                getLogger().debug("\tfor protocol: " + protocol + " " + configs[i].getAttribute("class"));
  +                if (getLogger().isDebugEnabled()) {
  +                    getLogger().debug("\tfor protocol: " + protocol + " " + configs[i].getAttribute("class"));
  +                }
                   sourceFactory = (SourceFactory) ClassUtils.newInstance(configs[i].getAttribute("class"));
                   this.init(sourceFactory, configs[i]);
                   factories.put(protocol, sourceFactory);
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.2.2.1   +7 -3      xml-cocoon2/src/java/org/apache/cocoon/components/store/JispFilesystemStore.java
  
  Index: JispFilesystemStore.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/store/JispFilesystemStore.java,v
  retrieving revision 1.2
  retrieving revision 1.2.2.1
  diff -u -r1.2 -r1.2.2.1
  --- JispFilesystemStore.java	22 Feb 2002 07:00:13 -0000	1.2
  +++ JispFilesystemStore.java	19 Dec 2002 11:24:32 -0000	1.2.2.1
  @@ -271,9 +271,13 @@
               value = mDatabase.read(this.wrapKeyObject(key), mIndex);
               if (getLogger().isDebugEnabled()) {
                   if (value != null) {
  -                    getLogger().debug("Found key: " + key);
  +                    if (getLogger().isDebugEnabled()) {
  +                        getLogger().debug("Found key: " + key);
  +                    }
                   } else {
  -                    getLogger().debug("NOT Found key: " + key);
  +                    if (getLogger().isDebugEnabled()) {
  +                        getLogger().debug("NOT Found key: " + key);
  +                    }
                   }
               }
           } catch (Exception e) {
  
  
  
  1.15.2.1  +4 -2      xml-cocoon2/src/java/org/apache/cocoon/components/store/MRUMemoryStore.java
  
  Index: MRUMemoryStore.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/store/MRUMemoryStore.java,v
  retrieving revision 1.15
  retrieving revision 1.15.2.1
  diff -u -r1.15 -r1.15.2.1
  --- MRUMemoryStore.java	28 Mar 2002 09:56:58 -0000	1.15
  +++ MRUMemoryStore.java	19 Dec 2002 11:24:32 -0000	1.15.2.1
  @@ -147,7 +147,9 @@
   
               // save all cache entries to filesystem
               if (this.persistent) {
  -                getLogger().debug("Final cache size: " + this.cache.size());
  +                if (getLogger().isDebugEnabled()) {
  +                    getLogger().debug("Final cache size: " + this.cache.size());
  +                }
                   Enumeration enum = this.cache.keys();
                   while (enum.hasMoreElements()) {
                       Object key = enum.nextElement();
  
  
  
  1.11.2.2  +5 -3      xml-cocoon2/src/java/org/apache/cocoon/components/store/StoreJanitorImpl.java
  
  Index: StoreJanitorImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/store/StoreJanitorImpl.java,v
  retrieving revision 1.11.2.1
  retrieving revision 1.11.2.2
  diff -u -r1.11.2.1 -r1.11.2.2
  --- StoreJanitorImpl.java	6 Sep 2002 03:04:15 -0000	1.11.2.1
  +++ StoreJanitorImpl.java	19 Dec 2002 11:24:32 -0000	1.11.2.2
  @@ -319,7 +319,7 @@
       }
   
       /**
  -     * This method claculates the number of Elements to be freememory
  +     * This method calculates the number of Elements to be freememory
        * out of the Cache.
        *
        * @param store the Store which was selected as victim
  @@ -328,7 +328,9 @@
       private int calcToFree(Store store) {
           int cnt = store.size();
           if (cnt < 0) {
  -            getLogger().debug("Unknown size of the store: " + store);
  +            if (getLogger().isDebugEnabled()) {
  +                getLogger().debug("Unknown size of the store: " + store);
  +            }
               return 0;
           }
           return (int)(cnt * fraction);
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.3.2.6   +8 -4      xml-cocoon2/src/java/org/apache/cocoon/components/treeprocessor/DefaultTreeBuilder.java
  
  Index: DefaultTreeBuilder.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/treeprocessor/DefaultTreeBuilder.java,v
  retrieving revision 1.3.2.5
  retrieving revision 1.3.2.6
  diff -u -r1.3.2.5 -r1.3.2.6
  --- DefaultTreeBuilder.java	25 Nov 2002 21:51:59 -0000	1.3.2.5
  +++ DefaultTreeBuilder.java	19 Dec 2002 11:24:32 -0000	1.3.2.6
  @@ -188,7 +188,9 @@
           this.configuration = config;
   
           this.languageName = config.getAttribute("name");
  -        getLogger().debug("Configuring Builder for language : " + this.languageName);
  +        if (getLogger().isDebugEnabled()) {
  +            getLogger().debug("Configuring Builder for language : " + this.languageName);
  +        }
   
           this.fileName = config.getChild("file").getAttribute("name");
   
  @@ -315,8 +317,10 @@
           //FIXME : check namespace
           String nodeName = config.getName();
   
  -        getLogger().debug("Creating node builder for " + nodeName);
  -
  +        if (getLogger().isDebugEnabled()) {
  +            getLogger().debug("Creating node builder for " + nodeName);
  +        }
  +        
           ProcessingNodeBuilder builder;
           try {
               builder = (ProcessingNodeBuilder)this.builderSelector.select(nodeName);
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.5.2.2   +16 -6     xml-cocoon2/src/java/org/apache/cocoon/components/url/URLFactoryImpl.java
  
  Index: URLFactoryImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/url/URLFactoryImpl.java,v
  retrieving revision 1.5.2.1
  retrieving revision 1.5.2.2
  diff -u -r1.5.2.1 -r1.5.2.2
  --- URLFactoryImpl.java	31 May 2002 14:22:38 -0000	1.5.2.1
  +++ URLFactoryImpl.java	19 Dec 2002 11:24:32 -0000	1.5.2.2
  @@ -117,10 +117,14 @@
               }
           }
           try {
  -            getLogger().debug("Making URL from " + location);
  +            if (getLogger().isDebugEnabled()) {
  +                getLogger().debug("Making URL from " + location);
  +            }
               return new URL(location);
           } catch (MalformedURLException mue) {
  -            getLogger().debug("Making URL - MalformedURLException in getURL:" , mue);
  +            if (getLogger().isDebugEnabled()) {
  +                getLogger().debug("Making URL - MalformedURLException in getURL:" , mue);
  +            }
   
               org.apache.cocoon.environment.Context envContext = null;
               try {
  @@ -134,12 +138,16 @@
               if (path != null)
                   return (new File(path)).toURL();
   
  -            getLogger().debug("Making URL a Resource:" + location);
  +            if (getLogger().isDebugEnabled()) {
  +                getLogger().debug("Making URL a Resource:" + location);
  +            }
               URL url = envContext.getResource(location);
               if(url != null)
                   return url;
   
  -            getLogger().debug("Making URL a File (assuming that it is full path):" + location);
  +            if (getLogger().isDebugEnabled()) {
  +                getLogger().debug("Making URL a File (assuming that it is full path):" + location);
  +            }
               return (new File(location)).toURL();
           }
       }
  @@ -188,7 +196,9 @@
                   if (factories.containsKey(protocol)) {
                       throw new ConfigurationException("URLFactory defined twice for protocol: " + protocol);
                   }
  -                getLogger().debug("\tfor protocol: " + protocol + " " + configs[i].getAttribute("class"));
  +                if (getLogger().isDebugEnabled()) {
  +                    getLogger().debug("\tfor protocol: " + protocol + " " + configs[i].getAttribute("class"));
  +                }
                   urlFactory = (URLFactory) ClassUtils.newInstance(configs[i].getAttribute("class"));
                   this.init(urlFactory, configs[i]);
                   factories.put(protocol, urlFactory);
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.18.2.7  +4 -2      xml-cocoon2/src/java/org/apache/cocoon/components/xslt/XSLTProcessorImpl.java
  
  Index: XSLTProcessorImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/xslt/XSLTProcessorImpl.java,v
  retrieving revision 1.18.2.6
  retrieving revision 1.18.2.7
  diff -u -r1.18.2.6 -r1.18.2.7
  --- XSLTProcessorImpl.java	21 Sep 2002 04:03:51 -0000	1.18.2.6
  +++ XSLTProcessorImpl.java	19 Dec 2002 11:24:32 -0000	1.18.2.7
  @@ -189,7 +189,9 @@
               this.tfactoryClass = null;
           } else {
               // Will use specific class
  -            getLogger().debug("Using factory " + factoryName);
  +            if (getLogger().isDebugEnabled()) {
  +                getLogger().debug("Using factory " + factoryName);
  +            }
               try {
                   this.tfactoryClass = ClassUtils.loadClass(factoryName);
               } catch(ClassNotFoundException cnfe) {
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.8.2.6   +20 -1     xml-cocoon2/src/webapp/WEB-INF/web.xml
  
  Index: web.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/webapp/WEB-INF/web.xml,v
  retrieving revision 1.8.2.5
  retrieving revision 1.8.2.6
  diff -u -r1.8.2.5 -r1.8.2.6
  --- web.xml	29 Oct 2002 05:42:41 -0000	1.8.2.5
  +++ web.xml	19 Dec 2002 11:24:33 -0000	1.8.2.6
  @@ -263,7 +263,26 @@
         <param-value>true</param-value>
       </init-param>
       
  -    
  +    <!--
  +      Set encoding used by the container. If not set the ISO-8859-1 encoding will be assumed.
  +    -->
  +    <!--
  +    <init-param>
  +      <param-name>container-encoding</param-name>
  +      <param-value>utf-8</param-value>
  +    </init-param>
  +    -->
  +
  +    <!--
  +      Set form encoding. This will be the character set used to decode request parameters 
  +    -->
  +    <!--
  +    <init-param>
  +      <param-name>form-encoding</param-name>
  +      <param-value>utf-8</param-value>
  +    </init-param>
  +    -->
  +   
       <!--
         This parameter allows you to startup Cocoon2 immediately after startup
         of your servlet engine.
  
  
  

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