avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blorit...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/system ContainerManager.java
Date Tue, 05 Feb 2002 18:43:16 GMT
bloritsch    02/02/05 10:43:16

  Modified:    src/scratchpad/org/apache/avalon/excalibur/system
                        ContainerManager.java
  Log:
  force errors on loading LogKitConfig to be fatal
  
  Revision  Changes    Path
  1.13      +9 -15     jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/system/ContainerManager.java
  
  Index: ContainerManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/system/ContainerManager.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- ContainerManager.java	5 Feb 2002 14:15:04 -0000	1.12
  +++ ContainerManager.java	5 Feb 2002 18:43:15 -0000	1.13
  @@ -7,6 +7,7 @@
    */
   package org.apache.avalon.excalibur.system;
   
  +import org.apache.avalon.framework.CascadingRuntimeException;
   import org.apache.avalon.framework.activity.*;
   import org.apache.avalon.framework.context.*;
   import org.apache.avalon.framework.component.*;
  @@ -64,14 +65,6 @@
    *     </td>
    *   </tr>
    *   <tr>
  - *     <td><code>XML_PARSER</code></td>
  - *     <td>
  - *       <code>String</code> fully qualified class name of the Parser component
  - *       implementation.  It defaults to
  - *       "<code>org.apache.avalon.excalibur.xml.JaxpParser</code>".
  - *     </td>
  - *   </tr>
  - *   <tr>
    *     <td><code>LOG_CATEGORY</code></td>
    *     <td>
    *       <code>String</code> root category name for the container and its manager.
  @@ -123,14 +116,13 @@
    * </table>
    *
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
  - * @version CVS $Revision: 1.12 $ $Date: 2002/02/05 14:15:04 $
  + * @version CVS $Revision: 1.13 $ $Date: 2002/02/05 18:43:15 $
    */
   public class ContainerManager
   {
       public static final String CONTEXT_DIRECTORY = Container.CONTEXT_DIRECTORY;
       public static final String WORK_DIRECTORY    = Container.WORK_DIRECTORY;
       public static final String CONTAINER_CLASS   = "container.class";
  -    public static final String XML_PARSER        = "container.xmlParser";
       public static final String LOGKIT_CONFIG     = "container.loggerConfig";
       public static final String ROLE_CONFIG       = "container.roles";
       public static final String THREADS_CPU       = "container.threadsPerCPU";
  @@ -523,17 +515,19 @@
           {
               String configFile = m_initialParameters.getParameter( LOGKIT_CONFIG, "" );
   
  +            if ( "".equals( configFile.trim() ) )
  +            {
  +                return EMPTY_CONFIG;
  +            }
  +
               try
               {
                   m_logKitConfig = m_configBuilder.buildFromFile( configFile );
               }
               catch (Exception e)
               {
  -                if ( getLogger().isWarnEnabled() )
  -                {
  -                    getLogger().warn("Could not read configuration file: " + configFile,
e);
  -                    m_logKitConfig = EMPTY_CONFIG;
  -                }
  +                // This needs to be considered a fatal exception
  +                throw new CascadingRuntimeException( "Could not load config file for LogKitConfig.",
e );
               }
           }
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message