avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/frontends CLIMain.java
Date Thu, 21 Mar 2002 08:54:09 GMT
donaldp     02/03/21 00:54:09

  Modified:    src/java/org/apache/avalon/phoenix/frontends CLIMain.java
  Log:
  Parameterizable and configurable can not both be implemented by an embeddor
  
  Revision  Changes    Path
  1.27      +9 -5      jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/frontends/CLIMain.java
  
  Index: CLIMain.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/frontends/CLIMain.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- CLIMain.java	21 Mar 2002 08:17:48 -0000	1.26
  +++ CLIMain.java	21 Mar 2002 08:54:09 -0000	1.27
  @@ -160,12 +160,16 @@
       /**
        * Startup the embeddor.
        */
  -    private synchronized boolean startup( final Parameters parameters, final Hashtable
data )
  +    private synchronized boolean startup( final Parameters parameters,
  +                                          final Hashtable data )
       {
           try
           {
  -            Configuration conf = getConfigurationFor( parameters.getParameter( "phoenix.configfile"
) ).getChild( "embeddor" );
  -            m_embeddor = (Embeddor)Class.forName( conf.getAttribute( "class" ) ).newInstance();
  +            final String configFilename = parameters.getParameter( "phoenix.configfile"
);
  +            final Configuration root = getConfigurationFor( configFilename );
  +            final Configuration configuration = root.getChild( "embeddor" );
  +            final String embeddorClassname = configuration.getAttribute( "class" );
  +            m_embeddor = (Embeddor)Class.forName( embeddorClassname ).newInstance();
   
               if( m_embeddor instanceof LogEnabled )
               {
  @@ -183,9 +187,9 @@
               {
                   ( (Parameterizable)m_embeddor ).parameterize( parameters );
               }
  -            if( m_embeddor instanceof Configurable )
  +            else if( m_embeddor instanceof Configurable )
               {
  -                ( (Configurable)m_embeddor ).configure( conf );
  +                ( (Configurable)m_embeddor ).configure( configuration );
               }
   
               m_embeddor.initialize();
  
  
  

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