avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject cvs commit: avalon-sandbox/merlin/src/test/config demo.xml external.xml
Date Sat, 18 Jan 2003 02:11:43 GMT
mcconnell    2003/01/17 18:11:43

  Modified:    merlin   blocks.xml default.properties
               merlin/src/java/org/apache/avalon/merlin/kernel
                        DefaultKernel.java
  Added:       merlin/src/test/config demo.xml
  Removed:     merlin/src/test/config external.xml
  Log:
  Removal of external <implementation src="zzz"> loading based on preferred appraoch
using <block src="xxx">.  A.K.A FISS.
  
  Revision  Changes    Path
  1.6       +1 -1      avalon-sandbox/merlin/blocks.xml
  
  Index: blocks.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/blocks.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- blocks.xml	17 Jan 2003 06:42:00 -0000	1.5
  +++ blocks.xml	18 Jan 2003 02:11:43 -0000	1.6
  @@ -22,7 +22,7 @@
   
      <block name="playground" path="../assembly/build/lib/avalon-assembly-demo-1.0.jar"
enabled="true"/>
   
  -   <block name="demo" path="../merlin/build/lib/avalon-merlin-demo-1.0.jar" enabled="true">
  +   <block name="demo" src="src/test/config/demo.xml" enabled="true" >
        <configuration target="test">
          <configuration target="standard">
            <message>Client supplied message.</message>
  
  
  
  1.7       +1 -1      avalon-sandbox/merlin/default.properties
  
  Index: default.properties
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/default.properties,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- default.properties	15 Jan 2003 09:14:50 -0000	1.6
  +++ default.properties	18 Jan 2003 02:11:43 -0000	1.7
  @@ -71,7 +71,7 @@
   util.concurrent.jar=${excalibur-event.home}/lib/util.concurrent-1.3.1.jar
   commons-collections.jar=${excalibur-event.home}/lib/commons-collections-20021002.jar
   
  -# ----- Excalibur thread, version 1.0 or later -----
  +# ----- Excalibur collections, version 1.0 or later -----
   excalibur-collections.home=${excalibur.home}/collections
   excalibur-collections.lib=${excalibur-collections.home}/build/lib
   excalibur-collections.jar=${excalibur-collections.lib}/excalibur-collections-1.0.jar
  
  
  
  1.28      +2 -44     avalon-sandbox/merlin/src/java/org/apache/avalon/merlin/kernel/DefaultKernel.java
  
  Index: DefaultKernel.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/src/java/org/apache/avalon/merlin/kernel/DefaultKernel.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- DefaultKernel.java	15 Jan 2003 12:32:31 -0000	1.27
  +++ DefaultKernel.java	18 Jan 2003 02:11:43 -0000	1.28
  @@ -677,8 +677,7 @@
               base = builder.build( is );
           }
   
  -        Configuration implementation = 
  -          getImplementationConfiguration( base.getChild( "implementation" ) );
  +        Configuration implementation = base.getChild( "implementation" );
   
           Configuration engineConfig = implementation.getChild( "engine" );
           EngineClassLoader engine = createChildEngine( m_engine, m_home, engineConfig, url,
logger );
  @@ -1107,47 +1106,6 @@
           {
               final String error = "Unable to create configuration from jar file: " + jar.getName();
               throw new BlockException( error, e );
  -        }
  -    }
  -
  -   /**
  -    * Check the implementation configuration for a src attribute and if not null 
  -    * load an external implememntation configuration.
  -    *
  -    * @param implementation the block implementation configuration 
  -    * @return the resolved implementation configuration
  -    */
  -    private Configuration getImplementationConfiguration( Configuration implementation
)
  -      throws ConfigurationException
  -    {
  -        String path = implementation.getAttribute( "src", null );
  -        if( path == null )
  -        {
  -            getLogger().info( "loading block implementation" );
  -            return implementation;
  -        }
  -        else
  -        {
  -            File file = new File( m_home, path );
  -            try
  -            {
  -                DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
  -                getLogger().info( "loading external block implementation from: " + file
);
  -                InputStream input = new FileInputStream( file );
  -                if( input == null )
  -                {
  -                    final String error = 
  -                      "Null stream returned from path: " + file;
  -                    throw new IllegalArgumentException( error );
  -                }
  -                return builder.build( input );
  -            }
  -            catch( Throwable e )
  -            {
  -                final String error = 
  -                  "Unable to load extenal block implementation configuration from src:
" + file;
  -                throw new ConfigurationException( error, e );
  -            }
           }
       }
   }
  
  
  
  1.1                  avalon-sandbox/merlin/src/test/config/demo.xml
  
  Index: demo.xml
  ===================================================================
  
  <!--
  Demonstration of an block implementation configuration file.
  -->
  
  <block>
  
    <implementation>
  
       <engine>
         <classpath>
           <fileset dir="build/lib">
             <include name="avalon-merlin-demo-1.0.jar"/>
           </fileset>
         </classpath>
       </engine>
  
       <!-- 
       an implementation may contain a single engine declaration,
       multiple components and multiple containers
       -->
       
       <engine/>
  
       <appliance name="standard" class="org.apache.avalon.playground.StandardComponent"
activation="startup">
           <context class="org.apache.avalon.playground.StandardContextImp"/>
       </appliance>
  
       <container name="test"/>
  
    </implementation>
  
  </block>
  
  
  

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