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/merlin-smp/xdocs/starting/hello config.xml
Date Thu, 03 Apr 2003 16:08:10 GMT
mcconnell    2003/04/03 08:08:10

  Modified:    merlin/merlin-smp/xdocs/starting/hello config.xml
  Log:
  Added information about the creation of a default static configuration assigned to a component
type.
  
  Revision  Changes    Path
  1.3       +39 -3     avalon-sandbox/merlin/merlin-smp/xdocs/starting/hello/config.xml
  
  Index: config.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/merlin-smp/xdocs/starting/hello/config.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- config.xml	3 Apr 2003 14:36:44 -0000	1.2
  +++ config.xml	3 Apr 2003 16:08:10 -0000	1.3
  @@ -52,11 +52,11 @@
       * @param config the component configuration
       * @exception ConfigurationException if a configuration error occurs
       */
  -    <strong>public void configure( Configuration config ) throws ConfigurationException
  +    public void configure( Configuration config ) throws ConfigurationException
       {
           getLogger().info( "configuration stage" );
           m_source = config.getChild( "source" ).getValue( "unknown" );
  -    }</strong>
  +    }
   
      /**
       * Initialization of the component by the container.
  @@ -91,7 +91,43 @@
           </source>
   
         </subsection>
  -      <subsection name="Updating the block">
  +
  +      <subsection name="Creating a default configuration">
  +        <p>
  +        Merlin provides support for the association of a a default
  +        configuration associated with a component type.  This is 
  +        achieved by including a &lt;classname&gt;.xconfig resource
  +        co-located with the component class.
  +        </p>
  +
  +        <p><i>HelloComponent.xconfig</i></p>
  +
  +<source><![CDATA[
  +<configuration>
  +  <source>packaged default</source>
  +</configuration>
  +]]></source>
  +        <p>
  +        Build and run the tutorial again.
  +        </p>
  +        <source>
  +$ ant jar
  +$ merlin build\classes
  +        </source>
  +        <p>
  +        In the logging output we see that the configuration
  +        supplied to the component has been overrided by the 
  +        information we supplied inside the xconfig resource.
  +        </p>
  +        <source>
  +[INFO   ] (tutorial.hello): configuration stage
  +[INFO   ] (tutorial.hello): initialization stage
  +[INFO   ] (tutorial.hello): source: packaged default
  +        </source>
  +
  +      </subsection>
  +
  +      <subsection name="Declaring a configuration in the Component Directive">
           <p>
           We can modify the above behaviour at a more general level
           by including a configuration within the block.xml directive.
  
  
  

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


Mime
View raw message