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-platform/xdocs/starting/tutorial/context casting.xml entries.xml standard.xml
Date Sat, 23 Aug 2003 02:23:31 GMT
mcconnell    2003/08/22 19:23:31

  Modified:    merlin   maven.xml
               merlin/composition/src/java/org/apache/avalon/composition/data/builder
                        ProfilePackageBuilder.java
               merlin/composition/src/java/org/apache/avalon/composition/logging/impl
                        DefaultLoggingManager.java
               merlin/composition/src/java/org/apache/avalon/composition/model/impl
                        DefaultDependencyModel.java
                        DefaultDeploymentContext.java
                        DefaultDeploymentModel.java
               merlin/composition-spi/src/java/org/apache/avalon/composition/data
                        BlockCompositionDirective.java
                        BlockIncludeDirective.java CategoriesDirective.java
                        ConstructorDirective.java ContainmentProfile.java
                        ContextDirective.java EntryDirective.java
                        FilesetDirective.java LibraryDirective.java
                        ProfilePackage.java SelectionDirective.java
                        TargetDirective.java Targets.java
               merlin/composition-spi/src/java/org/apache/avalon/composition/logging
                        LoggingDescriptor.java
               merlin/composition-spi/src/java/org/apache/avalon/composition/model
                        DeploymentContext.java DeploymentModel.java
               merlin/kernel/impl/src/java/org/apache/avalon/merlin/kernel/impl
                        DefaultKernelContext.java
               merlin/merlin-platform/xdocs/starting/tutorial creation.xml
                        dependencies.xml execution.xml internal.xml
                        services.xml
               merlin/merlin-platform/xdocs/starting/tutorial/config
                        block.xml configurable.xml defaults.xml
                        navigation.xml override.xml
               merlin/merlin-platform/xdocs/starting/tutorial/context
                        casting.xml entries.xml standard.xml
  Log:
  Updating the core tutorials to reflect the tutorial implementation and some minor extras in the kernel class to provide more plesent debug info.
  
  Revision  Changes    Path
  1.44      +1 -1      avalon-sandbox/merlin/maven.xml
  
  Index: maven.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/maven.xml,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- maven.xml	22 Aug 2003 18:00:07 -0000	1.43
  +++ maven.xml	23 Aug 2003 02:23:30 -0000	1.44
  @@ -269,7 +269,7 @@
         noindex="false" author="true" use="true"
   	windowtitle="${title}" 
         bottom="${copyright}"
  -      additionalparam="-breakiterator -J-Xmx128m -tag todo:a:ToDo: "
  +      additionalparam="-breakiterator -J-Xmx128m "
         packagenames="*,org.*">
           <j:forEach var="packageGroup" items="${pom.packageGroups}">
             <group title="${packageGroup.title}" packages="${packageGroup.packages}"/>
  
  
  
  1.3       +10 -10    avalon-sandbox/merlin/composition/src/java/org/apache/avalon/composition/data/builder/ProfilePackageBuilder.java
  
  Index: ProfilePackageBuilder.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/composition/src/java/org/apache/avalon/composition/data/builder/ProfilePackageBuilder.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ProfilePackageBuilder.java	27 Jul 2003 11:50:04 -0000	1.2
  +++ ProfilePackageBuilder.java	23 Aug 2003 02:23:30 -0000	1.3
  @@ -82,8 +82,7 @@
        * Create a {@link ProfilePackage} from a type.
        *
        * @param name the component type name
  -     * @param type the component type meta-info descriptor
  -     * @param classloader the classloader
  +     * @param clazz the component class
        * @return the profile package
        * @exception Exception if a error occurs during package creation
        */
  @@ -118,28 +117,29 @@
       /**
        * Build ProfilePackage from the serialized format.
        *
  +     * @param input the object input stream
        * @throws Exception if an error occurs
        */
  -    private ProfilePackage buildFromSerDescriptor( InputStream inputStream )
  +    private ProfilePackage buildFromSerDescriptor( InputStream input )
           throws Exception
       {
  -        return m_serial.createProfilePackage( inputStream );
  +        return m_serial.createProfilePackage( input );
       }
   
       /**
  -     * Build CompositionProfile from an XML descriptor.
  +     * Build a ProfilePackage from an XML descriptor.
        *
        * @param name the type name
        * @param classname the type classname
  -     * @param inputStream the input stream for the profile
  +     * @param input the input stream for the profile
        * @throws Exception if an error occurs
        */
       private ProfilePackage buildFromXMLDescriptor( 
  -      final String name, final String classname, InputStream inputStream )
  +      final String name, final String classname, InputStream input )
           throws Exception
       {
  -        final InputSource inputSource = new InputSource( inputStream );
  -        Configuration config = ConfigurationBuilder.build( inputSource );
  +        final InputSource source = new InputSource( input );
  +        Configuration config = ConfigurationBuilder.build( source );
           return m_xml.createProfilePackage( name, classname, config );
       }
   
  
  
  
  1.7       +6 -10     avalon-sandbox/merlin/composition/src/java/org/apache/avalon/composition/logging/impl/DefaultLoggingManager.java
  
  Index: DefaultLoggingManager.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/composition/src/java/org/apache/avalon/composition/logging/impl/DefaultLoggingManager.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- DefaultLoggingManager.java	22 Aug 2003 18:00:07 -0000	1.6
  +++ DefaultLoggingManager.java	23 Aug 2003 02:23:30 -0000	1.7
  @@ -127,7 +127,6 @@
        * The context value will be passed directly to lifestyle handlers
        * established by this service.
        * @param base the directory for logging targets
  -     * @param system the name of the system logging category (may be null)
        * @param descriptor the logging system descriptor (may be null)
        */
       public DefaultLoggingManager( 
  @@ -140,10 +139,10 @@
        * <p>Application of a runtime context to the manager.
        * The context value will be passed directly to lifestyle handlers
        * established by this service.
  -     * @param logger the bootstrap logging channel
  +     *
        * @param base the directory for logging targets
  -     * @param system the name of the system logging category (may be null)
        * @param descriptor the logging system descriptor (may be null)
  +     * @param debug a debug flag
        */
       public DefaultLoggingManager( 
          File base, LoggingDescriptor descriptor, boolean debug ) throws Exception
  @@ -219,11 +218,12 @@
       }
   
       //===============================================================
  -    // 
  +    // LoggingManager
       //===============================================================
   
       /**
        * Add a set of category entries using the supplied categories descriptor.
  +     *
        * @param descriptor a set of category descriptors to be added under the path
        */
       public void addCategories( CategoriesDirective descriptor )
  @@ -234,9 +234,9 @@
       /**
        * Add a set of category entries relative to the supplied base category
        * path, using the supplied descriptor as the definition of subcategories.
  +     *
        * @param root the category base path
  -     * @param descriptor a set of category descriptors to be added under
  -     *   the base path
  +     * @param directive a category directive to add
        */
       public void addCategories( String root, CategoriesDirective directive )
       {
  @@ -298,10 +298,6 @@
                   )
           );
       }
  -
  -    //===============================================================
  -    // LoggerManager
  -    //===============================================================
   
       /**
        * Return the Logger for the specified category.
  
  
  
  1.7       +7 -6      avalon-sandbox/merlin/composition/src/java/org/apache/avalon/composition/model/impl/DefaultDependencyModel.java
  
  Index: DefaultDependencyModel.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/composition/src/java/org/apache/avalon/composition/model/impl/DefaultDependencyModel.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- DefaultDependencyModel.java	26 Jul 2003 16:28:52 -0000	1.6
  +++ DefaultDependencyModel.java	23 Aug 2003 02:23:30 -0000	1.7
  @@ -107,8 +107,10 @@
       * Creation of a new dependency model.
       *
       * @param logger the logging channel
  -    * @param descriptors the dependency descriptors
  -    * @param directives the dependency directives (possibly null)
  +    * @param partition the partition
  +    * @param name the name
  +    * @param descriptor the dependency descriptor
  +    * @param directive the dependency directive (possibly null)
       */
       public DefaultDependencyModel( 
         final Logger logger, final String partition, final String name, 
  @@ -183,7 +185,6 @@
       * Filter a set of candidate service descriptors and return the 
       * set of acceptable service as a ordered sequence.
       *
  -    * @param key the dependency key
       * @param candidates the set of candidate services for the dependency
       *    matching the supplied key
       * @return the accepted candidates in ranked order
  @@ -205,8 +206,8 @@
       * Filter a set of candidate service descriptors and return the 
       * set of acceptable service as a ordered sequence.
       *
  -    * @param key the dependency directive
  -    * @param candidates the set of candidate services for the dependency
  +    * @param directive the dependency directive
  +    * @param services the set of candidate services for the dependency
       * @return the accepted candidates in ranked order
       */
       private ServiceDescriptor[] filter( 
  
  
  
  1.7       +11 -4     avalon-sandbox/merlin/composition/src/java/org/apache/avalon/composition/model/impl/DefaultDeploymentContext.java
  
  Index: DefaultDeploymentContext.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/composition/src/java/org/apache/avalon/composition/model/impl/DefaultDeploymentContext.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- DefaultDeploymentContext.java	24 Jul 2003 13:14:54 -0000	1.6
  +++ DefaultDeploymentContext.java	23 Aug 2003 02:23:30 -0000	1.7
  @@ -121,9 +121,16 @@
      /**
       * Creation of a new deployment context.
       *
  -    * @param context the containment context
  +    * @param logger the logging channel to assign
  +    * @param name the deployment context name
  +    * @param context the containment context in which this 
  +    *     deployment context is scoped
  +    * @param profile the deployment profile
  +    * @param type the underlying component type
  +    * @param clazz the compoent deployment class
       * @param home the home working directory
       * @param temp a temporary directory 
  +    * @param partition the partition name 
       */
       public DefaultDeploymentContext( 
         Logger logger, String name, ContainmentContext context, 
  @@ -296,8 +303,8 @@
   
      /**
       * Add a context entry model to the deployment context.
  -    * @param key
  -    * @param value
  +    * @param model the entry model
  +    * @exception IllegalArgumentException if model key is unknown
       */
       public void register( EntryModel model )
       {
  
  
  
  1.22      +8 -7      avalon-sandbox/merlin/composition/src/java/org/apache/avalon/composition/model/impl/DefaultDeploymentModel.java
  
  Index: DefaultDeploymentModel.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/composition/src/java/org/apache/avalon/composition/model/impl/DefaultDeploymentModel.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- DefaultDeploymentModel.java	18 Aug 2003 11:26:05 -0000	1.21
  +++ DefaultDeploymentModel.java	23 Aug 2003 02:23:30 -0000	1.22
  @@ -261,7 +261,8 @@
   
      /**
       * Return the set of services produced by the model.
  -    * @return the services
  +    *
  +    * @return the service descriptors
       */
       public ServiceDescriptor[] getServices()
       {
  @@ -285,7 +286,7 @@
       * stage dependency.
       *
       * @param stage the stage descriptor
  -    * @return true if this model can fulfill the stage dependency
  +    * @return TRUE if this model can fulfill the stage dependency
       */
       public boolean isaCandidate( StageDescriptor stage )
       {
  @@ -307,7 +308,7 @@
   
      /**
       * Set categories. 
  -    * @param categories
  +    * @param categories the categories directive
       */
       public void setCategories( CategoriesDirective categories )
       {
  @@ -373,7 +374,7 @@
       * Rest if the component type backing the model is 
       * parameterizable.
       *
  -    * @param return TRUE if the compoent type is parameterizable
  +    * @return TRUE if the compoent type is parameterizable
       *   otherwise FALSE
       */
       public boolean isParameterizable()
  @@ -469,7 +470,7 @@
       * Rest if the component type backing the model is 
       * configurable.
       *
  -    * @param return TRUE if the component type is configurable
  +    * @return TRUE if the component type is configurable
       *   otherwise FALSE
       */
       public boolean isConfigurable()
  @@ -550,7 +551,7 @@
       * Test if the component type backing the model requires the 
       * establishment of a runtime context.
       *
  -    * @param return TRUE if the component type requires a runtime
  +    * @return TRUE if the component type requires a runtime
       *   context otherwise FALSE
       */
       public boolean isContextDependent()
  
  
  
  1.3       +4 -3      avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/data/BlockCompositionDirective.java
  
  Index: BlockCompositionDirective.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/data/BlockCompositionDirective.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- BlockCompositionDirective.java	17 Aug 2003 06:35:52 -0000	1.2
  +++ BlockCompositionDirective.java	23 Aug 2003 02:23:30 -0000	1.3
  @@ -68,8 +68,9 @@
       /**
        * Creation of a new resource directive.
        * @param name the name to assign to the container 
  -     *   established by the include directive
  -     * @param version the artifact version
  +     *   established by the composition directive
  +     * @param resource a resource reference from which a block 
  +     *   description can be resolved
        */
       public BlockCompositionDirective( 
         final String name, ResourceDirective resource )
  
  
  
  1.2       +3 -3      avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/data/BlockIncludeDirective.java
  
  Index: BlockIncludeDirective.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/data/BlockIncludeDirective.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- BlockIncludeDirective.java	30 Jul 2003 14:43:58 -0000	1.1
  +++ BlockIncludeDirective.java	23 Aug 2003 02:23:30 -0000	1.2
  @@ -65,8 +65,8 @@
   
       /**
        * Creation of a new entry directive.
  -     * @param key the context entry key
  -     * @param containerKey the container scoped key value to import
  +     * @param name the name to assign to the included container
  +     * @param path a relative path to the block descriptor
        */
       public BlockIncludeDirective( final String name, final String path )
       {
  
  
  
  1.4       +12 -6     avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/data/CategoriesDirective.java
  
  Index: CategoriesDirective.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/data/CategoriesDirective.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- CategoriesDirective.java	18 Aug 2003 11:26:05 -0000	1.3
  +++ CategoriesDirective.java	23 Aug 2003 02:23:30 -0000	1.4
  @@ -71,8 +71,6 @@
   
       /**
        * Create a CategoriesDirective instance.
  -     *
  -     * @param name the base category name
        */
       public CategoriesDirective()
       {
  @@ -92,7 +90,7 @@
       /**
        * Create a CategoriesDirective instance.
        *
  -     * @param name the base category name
  +     * @param categories the categories to include in the directive
        */
       public CategoriesDirective( CategoryDirective[] categories )
       {
  @@ -153,6 +151,12 @@
           return null;
       }
   
  +   /**
  +    * Test this object for equality with the suppplied object.
  +    *
  +    * @return TRUE if this object equals the supplied object
  +    *   else FALSE
  +    */
       public boolean equals( Object other )
       {
           boolean isEqual = other instanceof CategoriesDirective;
  @@ -170,10 +174,13 @@
                   }
               }
           }
  -
           return isEqual;
       }
   
  +   /**
  +    * Return the hashcode for the object.
  +    * @return the cashcode
  +    */
       public int hashCode()
       {
           int hash = super.hashCode();
  @@ -182,7 +189,6 @@
               hash >>>= 1;
               hash ^= m_categories[i].hashCode();
           }
  -
           return hash;
       }
   
  
  
  
  1.2       +3 -5      avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/data/ConstructorDirective.java
  
  Index: ConstructorDirective.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/data/ConstructorDirective.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ConstructorDirective.java	17 Jul 2003 21:21:58 -0000	1.1
  +++ ConstructorDirective.java	23 Aug 2003 02:23:30 -0000	1.2
  @@ -103,7 +103,6 @@
        * Creation of a new entry directive using a constructor
        * classname and single argument value.
        * @param key the entry key
  -     * @param classname the classname of the entry implementation
        * @param value the single argument value
        */
       public ConstructorDirective( 
  @@ -137,7 +136,6 @@
       /**
        * Creation of a new entry directive using a parameter.
        * @param key the entry key
  -     * @param classname the classname of the entry implementation
        * @param parameters implementation class constructor parameter directives
        */
       public ConstructorDirective( final String key, final Parameter[] parameters )
  @@ -189,8 +187,8 @@
       }
   
       /**
  -     * Return the constructor classname (may be null)
  -     * @return the classname
  +     * Return the constructor single argument
  +     * @return the costructor argument
        */
       public String getArgument()
       {
  
  
  
  1.6       +5 -7      avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/data/ContainmentProfile.java
  
  Index: ContainmentProfile.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/data/ContainmentProfile.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ContainmentProfile.java	11 Aug 2003 22:58:50 -0000	1.5
  +++ ContainmentProfile.java	23 Aug 2003 02:23:30 -0000	1.6
  @@ -129,7 +129,7 @@
       *    created for this containment profile
       * @param exports the set of servides that this component is 
       *    dependent on for normal execution
  -    * @param profile the set of profiles contained within this 
  +    * @param profiles the set of profiles contained within this 
       *    containment profile
       */
       public ContainmentProfile( 
  @@ -176,7 +176,7 @@
       /**
        * Retrieve a service directive matching a supplied class.
        *
  -     * @param class the class to match
  +     * @param clazz the class to match
        * @return the service directive or null if it does not exist
        */
       public ServiceDirective getExportDirective( final Class clazz )
  @@ -211,8 +211,6 @@
        *
        * @param mode one of enumerated value {@link Mode#IMPLICIT}, 
        *    {@link Mode#PACKAGED}, or {@link Mode#EXPLICIT}
  -     * @param enabled TRUE to select enabled directives, FALSE returns 
  -     * disabled directives
        * @return the profiles matching the supplied creation mode
        */
       public Profile[] getProfiles( Mode mode )
  @@ -223,9 +221,9 @@
   
       /**
        * Returns a sub-set of the supplied containers matching the supplied creation mode.
  -     * @param directives the directives to select from
  +     * @param profiles the profiles to select from
        * @param mode the creation mode to retrict the returned selection to
  -     * @param the subset of the supplied profiles with a creation mode matching
  +     * @return the subset of the supplied profiles with a creation mode matching
        *   the supplied mode value
        */
       private Profile[] selectProfileByMode( Profile[] profiles, Mode mode )
  
  
  
  1.3       +1 -5      avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/data/ContextDirective.java
  
  Index: ContextDirective.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/data/ContextDirective.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ContextDirective.java	25 Jul 2003 04:36:50 -0000	1.2
  +++ ContextDirective.java	23 Aug 2003 02:23:30 -0000	1.3
  @@ -96,8 +96,6 @@
   
       /**
        * Creation of a new file target.
  -     * @param classname the context implementation class
  -     * @param imports the set of import directives
        * @param entries the set of entry descriptors
        */
       public ContextDirective( final EntryDirective[] entries )
  @@ -108,7 +106,6 @@
       /**
        * Creation of a new file target.
        * @param classname the context implementation class
  -     * @param imports the set of import directives
        * @param entries the set of entry descriptors
        */
       public ContextDirective( final String classname, final EntryDirective[] entries )
  @@ -119,7 +116,6 @@
       /**
        * Creation of a new file target.
        * @param classname the context implementation class
  -     * @param imports the set of import directives
        * @param entries the set of entry descriptors
        * @param source a path to a source component for contextualization
        *    phase handling
  
  
  
  1.2       +1 -2      avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/data/EntryDirective.java
  
  Index: EntryDirective.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/data/EntryDirective.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- EntryDirective.java	17 Jul 2003 21:21:58 -0000	1.1
  +++ EntryDirective.java	23 Aug 2003 02:23:30 -0000	1.2
  @@ -93,7 +93,6 @@
       /**
        * Creation of a new entry directive using a import directive.
        * @param key the entry key
  -     * @param target the import directive defining the target key name
        */
       public EntryDirective( final String key )
       {
  
  
  
  1.2       +2 -2      avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/data/FilesetDirective.java
  
  Index: FilesetDirective.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/data/FilesetDirective.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FilesetDirective.java	17 Jul 2003 21:21:58 -0000	1.1
  +++ FilesetDirective.java	23 Aug 2003 02:23:30 -0000	1.2
  @@ -70,7 +70,7 @@
    *   &lt;/dirset&gt;
    * </pre>
    *
  - * @see IncludeDescriptor
  + * @see IncludeDirective
    * @author <a href="mailto:mcconnell@apache.org">Stephen McConnell</a>
    * @version $Revision$ $Date$
    */
  
  
  
  1.3       +5 -6      avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/data/LibraryDirective.java
  
  Index: LibraryDirective.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/data/LibraryDirective.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- LibraryDirective.java	7 Aug 2003 17:23:00 -0000	1.2
  +++ LibraryDirective.java	23 Aug 2003 02:23:30 -0000	1.3
  @@ -91,9 +91,7 @@
       private final String[] m_groups;
   
       /**
  -     * Create a new GroupDirective instance.
  -     *
  -     * @param identifier the group identifier
  +     * Create a new LibraryDirective instance.
        */
       public LibraryDirective( )
       {
  @@ -101,9 +99,10 @@
       }
   
       /**
  -     * Create a new GroupDirective instance.
  +     * Create a new LibraryDirective instance.
        *
  -     * @param identifier the group identifier
  +     * @param includes the set of include paths
  +     * @param groups the set of group identifiers
        */
       public LibraryDirective( final String[] includes, final String[] groups )
       {
  
  
  
  1.2       +6 -1      avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/data/ProfilePackage.java
  
  Index: ProfilePackage.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/data/ProfilePackage.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ProfilePackage.java	17 Jul 2003 21:21:59 -0000	1.1
  +++ ProfilePackage.java	23 Aug 2003 02:23:30 -0000	1.2
  @@ -84,6 +84,11 @@
           this( new DeploymentProfile[0] );
       }
   
  +    /**
  +     * Create a new profile package instance.
  +     *
  +     * @param profiles the set of contained profiles
  +     */
       public ProfilePackage( final DeploymentProfile[] profiles ) 
       {
           m_profiles = profiles;
  
  
  
  1.2       +2 -2      avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/data/SelectionDirective.java
  
  Index: SelectionDirective.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/data/SelectionDirective.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SelectionDirective.java	17 Jul 2003 21:21:59 -0000	1.1
  +++ SelectionDirective.java	23 Aug 2003 02:23:30 -0000	1.2
  @@ -87,7 +87,7 @@
      /**
       * Creation of a new dependency directive.
       * 
  -    * @param key the selection feature
  +    * @param feature the selection feature
       * @param value the value to asses
       * @param criteria the selection criteria
       * @param optional the optional status
  
  
  
  1.2       +1 -2      avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/data/TargetDirective.java
  
  Index: TargetDirective.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/data/TargetDirective.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TargetDirective.java	8 Aug 2003 22:12:19 -0000	1.1
  +++ TargetDirective.java	23 Aug 2003 02:23:30 -0000	1.2
  @@ -97,7 +97,6 @@
        * Create a new null Target instance.
        *
        * @param path target path
  -     * @param configuration the configuration 
        */
       public TargetDirective( final String path )
       {
  
  
  
  1.2       +3 -2      avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/data/Targets.java
  
  Index: Targets.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/data/Targets.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Targets.java	8 Aug 2003 22:12:19 -0000	1.1
  +++ Targets.java	23 Aug 2003 02:23:30 -0000	1.2
  @@ -107,6 +107,7 @@
       /**
        * Return a matching target.
        *
  +     * @param path the target path to lookup
        * @return the target or null if no matching target
        */
       public TargetDirective getTarget( String path )
  @@ -127,7 +128,7 @@
       /**
        * Return a set of targets relative to the supplied path.
        *
  -     * @param the path
  +     * @param path the base path to match against
        * @return the set of relative targets
        */
       public Targets getTargets( String path )
  
  
  
  1.5       +2 -4      avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/logging/LoggingDescriptor.java
  
  Index: LoggingDescriptor.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/logging/LoggingDescriptor.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- LoggingDescriptor.java	18 Aug 2003 11:26:05 -0000	1.4
  +++ LoggingDescriptor.java	23 Aug 2003 02:23:30 -0000	1.5
  @@ -107,10 +107,8 @@
        * @param root the root logger category name
        * @param priority the default logging priority
        * @param target the default logging target
  +     * @param categories the system categories
        * @param targets the set of logging targets
  -     * @param bootstrap the bootstrap category to use to log mesages
  -     *    from the logging system
  -     * @param system the system logging directives
        */
       public LoggingDescriptor( 
               final String root,
  
  
  
  1.7       +1 -2      avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/model/DeploymentContext.java
  
  Index: DeploymentContext.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/model/DeploymentContext.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- DeploymentContext.java	11 Aug 2003 22:58:50 -0000	1.6
  +++ DeploymentContext.java	23 Aug 2003 02:23:30 -0000	1.7
  @@ -171,7 +171,6 @@
   
      /**
       * Add a context entry model to the deployment context.
  -    * @param key the context entry key
       * @param model the entry model
       */
       public void register( EntryModel model );
  
  
  
  1.13      +6 -6      avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/model/DeploymentModel.java
  
  Index: DeploymentModel.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/model/DeploymentModel.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- DeploymentModel.java	18 Aug 2003 11:26:05 -0000	1.12
  +++ DeploymentModel.java	23 Aug 2003 02:23:30 -0000	1.13
  @@ -69,7 +69,7 @@
      /**
       * Return the deployment type.
       * 
  -    * @param the type
  +    * @return the type
       */
       Type getType();
   
  @@ -87,13 +87,13 @@
   
      /**
       * Set categories. 
  -    * @param categories
  +    * @param categories the logging categories
       */
       void setCategories( CategoriesDirective categories );
   
      /**
       * Set the activation policy for the model. 
  -    * @param the activaltion policy
  +    * @param policy the activaltion policy
       */
       void setActivationPolicy( boolean policy );
   
  @@ -142,7 +142,7 @@
       * Test if the component type backing the model is 
       * parameterizable.
       *
  -    * @param return TRUE if the component type is parameterizable
  +    * @return TRUE if the component type is parameterizable
       *   otherwise FALSE
       */
       public boolean isParameterizable();
  @@ -181,7 +181,7 @@
       * Rest if the component type backing the model requires the 
       * establishment of a runtime context.
       *
  -    * @param return TRUE if the component type requires a runtime
  +    * @return TRUE if the component type requires a runtime
       *   context otherwise FALSE
       */
       boolean isContextDependent();
  
  
  
  1.17      +45 -9     avalon-sandbox/merlin/kernel/impl/src/java/org/apache/avalon/merlin/kernel/impl/DefaultKernelContext.java
  
  Index: DefaultKernelContext.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/kernel/impl/src/java/org/apache/avalon/merlin/kernel/impl/DefaultKernelContext.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- DefaultKernelContext.java	22 Aug 2003 18:00:07 -0000	1.16
  +++ DefaultKernelContext.java	23 Aug 2003 02:23:30 -0000	1.17
  @@ -112,6 +112,8 @@
   
       private static final String CATEGORY_NAME = "context";
   
  +    private static final String USER_DIR = System.getProperty( "user.dir" ).replace( '\\', '/' );;
  +
       //==============================================================
       // immutable state
       //==============================================================
  @@ -608,7 +610,7 @@
                 + System.getProperty( "os.name" ) + " "
                 + System.getProperty( "os.version" ) + " Java " 
                 + System.getProperty( "java.version" ) );
  -        buffer.append( "\n  Deployment Home: " + getHomePath() );
  +        buffer.append( "\n  Deployment Home: " + getString( getHomePath() ) );
           buffer.append( "\n  Runtime Repository: " );
           if( m_system != null )
           {
  @@ -622,29 +624,63 @@
                    System.getProperty( "user.dir" ) ) ); 
               buffer.append( fallback );
           }
  -        buffer.append( "\n  Library Anchor: " + getLibraryPath() );
  +        buffer.append( "\n  Library Anchor: " + getString( getLibraryPath() ) );
           buffer.append( "\n  Kernel Path: " + m_kernelURL );
  -        buffer.append( "\n  Deployment Blocks: " + getInstallSequenceString() );
  +        buffer.append( "\n  Deployment Blocks: " + getString( m_blocks ) );
           buffer.append( "\n  Override Path: " );
           if( getOverrideDirective() != null )
           {
  -            buffer.append( getOverrideDirective() );
  +            buffer.append( getString( getOverrideDirective() ) );
           }
           buffer.append( "\n  Server Flag: " + getServerFlag() );
           buffer.append( "\n  Debug Flag: " + getDebugFlag() );
           return buffer.toString();
       }
   
  -    private String getInstallSequenceString()
  +    private String getString( String name )
  +    {
  +        String filtered = name.replace( '\\', '/' );
  +        return getString( filtered, USER_DIR, "${user.dir}" );
  +    }
  +
  +    private String getString( String name, String pattern, String replacement )
  +    {
  +        final int n = name.indexOf( pattern );
  +        if( n == -1 ) return name;
  +        if( name.startsWith( pattern ) )
  +        {
  +            return replacement + name.substring( pattern.length() );
  +        }
  +        else
  +        {
  +            String header = name.substring( 0, n );
  +            String tail = name.substring( n + pattern.length() );
  +            return header + replacement + tail; 
  +        }
  +    }
  +
  +    private String getString( File file )
  +    {
  +        if( file == null ) return "";
  +        return getString( file.toString() );
  +    }
  +
  +    private String getString( URL url )
  +    {
  +        if( url == null ) return "";
  +        return getString( url.toString() );
  +    }
  +
  +    private String getString( URL[] urls )
       {
           StringBuffer buffer = new StringBuffer();
  -        for( int i=0; i<m_blocks.length; i++ )
  +        for( int i=0; i<urls.length; i++ )
           {
  -            buffer.append( m_blocks[i].toString() );
  -            if( i < (m_blocks.length -1 ) )
  +            if( ( i > 0 ) && ( i < ( urls.length -1 ) ) )
               {
                   buffer.append( ", " );
               }
  +            buffer.append( getString( urls[i] ) );
           }
           return buffer.toString();
       }
  
  
  
  1.4       +3 -3      avalon-sandbox/merlin/merlin-platform/xdocs/starting/tutorial/creation.xml
  
  Index: creation.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/merlin-platform/xdocs/starting/tutorial/creation.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- creation.xml	22 Aug 2003 18:00:08 -0000	1.3
  +++ creation.xml	23 Aug 2003 02:23:30 -0000	1.4
  @@ -124,9 +124,9 @@
           and generates component descriptors for us automatically.
           </p>
   <source><![CDATA[
  -  <preGoal name="java:compile">
  -    <attainGoal name="avalon:meta"/>
  -  </preGoal>
  +<preGoal name="java:compile">
  +  <attainGoal name="avalon:meta"/>
  +</preGoal>
   ]]></source>
         </subsection>
   
  
  
  
  1.5       +56 -15    avalon-sandbox/merlin/merlin-platform/xdocs/starting/tutorial/dependencies.xml
  
  Index: dependencies.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/merlin-platform/xdocs/starting/tutorial/dependencies.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- dependencies.xml	4 Jul 2003 11:31:38 -0000	1.4
  +++ dependencies.xml	23 Aug 2003 02:23:30 -0000	1.5
  @@ -27,6 +27,9 @@
           The following code fragment is the implementation of the 
           Serviceable interface under the HelloComponent.java source. 
           </p>
  +        <p><i>
  +        Note the use of the @avalon.dependency tag. 
  +        </i></p>
           <p><i>HelloComponent.java</i></p>
   <source>
   package tutorial;
  @@ -35,16 +38,17 @@
   import org.apache.avalon.framework.service.Serviceable;
   import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.avalon.framework.service.ServiceException;
  +import org.apache.avalon.framework.activity.Initializable;
  +import org.apache.avalon.framework.activity.Disposable;
   
   /**
    * The HelloComponent is dependent on a RandomGenerator service.
  - * @avalon.meta.version 1.0
  - * @avalon.meta.name hello
  - * @avalon.meta.lifestyle singleton
  + * @avalon.component version="1.0" name="simple" lifestyle="singleton"
    */
   public class HelloComponent extends AbstractLogEnabled 
  -  implements Serviceable
  +  implements Initializable, Serviceable, Disposable
   {
  +    RandomGenerator m_random = null;
   
      /**
       * Servicing of the component by the container during 
  @@ -52,46 +56,68 @@
       * can be resolved using the supplied service manager.
       *
       * @param manager the service manager
  -    * @avalon.meta.dependency 
  -    *    type="tutorial.RandomGenerator"
  +    * @avalon.dependency type="tutorial.RandomGenerator:1.0"
       *    key="random"
       */
       public void service( ServiceManager manager )
         throws ServiceException
       {
  -        RandomGenerator random = (RandomGenerator) manager.lookup( "random" );
  -        getLogger().info( "random: " + random.getRandom() );
  +        m_random = (RandomGenerator) manager.lookup( "random" );
  +    }
  +
  +    public void initialize()
  +    {
  +        getLogger().info( "initialization" );
  +        getLogger().info( "received random value: " + m_random.getRandom() );
  +    }
  +
  +    public void dispose()
  +    {
  +        getLogger().info( "disposal" );
       }
   }
   </source>
         </subsection>
  +
         <subsection name="Declaring the service dependency">
           <p>
           In this example we are automatically generating the xinfo descriptors
  -        using the builtin meta-info generation goal.  The generated xinfo
  -        for the hello component is shown below. 
  +        using the builtin meta-info generation goal based on the presence of
  +        dependency tag.
  +        </p>
  +<source><![CDATA[
  +* @avalon.dependency type="tutorial.RandomGenerator:1.0"
  +*    key="random"
  +]]></source>
  +
  +        <p>
  +        The generated xinfo for the hello component is shown below. 
           </p>
           <p><i>HelloComponent.xinfo</i></p>
   <source><![CDATA[
  +<?xml version="1.0"?>
  +<!DOCTYPE type
  +      PUBLIC "-//AVALON/Type DTD Version 1.0//EN"
  +             "http://avalon.apache.org/dtds/meta/type_1_1.dtd" >
   <type>
     <info>
       <name>hello</name>
  -    <version>1.0.0</version>
  -    <lifestyle>singleton</lifestyle>
  +    <version>1.0</version>
     </info>
     <dependencies>
  -    <dependency key="random" type="tutorial.RandomGenerator" version="1.0.0"/>
  +    <dependency key="random" type="tutorial.RandomGenerator"/>
     </dependencies>
   </type>
   ]]></source>
         </subsection>
  +
         <subsection name="Executing the demo">
           <p>
           Build and run the tutorial.
           </p>
           <source>
   $ maven
  -$ merlin target\merlin-tutorial-dependencies-1.0.jar -execute
  +$ merlin target\classes -execute
           </source>
           <p>
           In the logging output we see that Merlin has automatically
  @@ -101,10 +127,25 @@
           the service.
           </p>
   <source>
  -[INFO   ] (tutorial.hello): random: -1509204111
  +[INFO   ] (tutorial.random-provider): initialization
  +[INFO   ] (tutorial.hello): initialization
  +[INFO   ] (tutorial.random-provider): processing request
  +[INFO   ] (tutorial.hello): received random value: 1234694919
  +[INFO   ] (tutorial.hello): disposal
  +[INFO   ] (tutorial.random-provider): disposal
   </source>
  +      </subsection>
   
  +      <subsection name="Advanced Features">
  +        <p>
  +        This completes the introduction to some of the basic features
  +        of the merlin platform.  More tutorials will be added so please check 
  +        for new releases and updates. In the meantime you may want to take a 
  +        look at some of Merlin's more <a href="../advanced/index.html">advanced 
  +        features</a>. 
  +        </p>
         </subsection>
  +
       </section>
     </body>
   
  
  
  
  1.3       +6 -1      avalon-sandbox/merlin/merlin-platform/xdocs/starting/tutorial/execution.xml
  
  Index: execution.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/merlin-platform/xdocs/starting/tutorial/execution.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- execution.xml	22 Aug 2003 18:00:08 -0000	1.2
  +++ execution.xml	23 Aug 2003 02:23:30 -0000	1.3
  @@ -15,7 +15,6 @@
           you can build and run the example using the following commands:
           </p>
   <source><![CDATA[
  -$ cd tutorial\hello
   $ maven
   ]]></source>
         </subsection>
  @@ -53,6 +52,12 @@
           <p>
           Congratulations! You have build and deployed your first block.
           </p>
  +   
  +        <p>
  +        A quick look at some of the behind the scenes activity is 
  +        presented in the <a href="internal.html">next tutorial</a>.
  +        </p>
  +
         </subsection>
       </section>
     </body>
  
  
  
  1.2       +93 -181   avalon-sandbox/merlin/merlin-platform/xdocs/starting/tutorial/internal.xml
  
  Index: internal.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/merlin-platform/xdocs/starting/tutorial/internal.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- internal.xml	10 Jun 2003 02:14:34 -0000	1.1
  +++ internal.xml	23 Aug 2003 02:23:30 -0000	1.2
  @@ -11,255 +11,167 @@
       <section name="Using Merlin">
         <subsection name="Behind the Scenes">
           <p>
  -        To get a better understanding of what is happening behind the scenes
  -        we can turn of system level logging.  
  +        To get a better understanding of what is happening we can ask Merlin
  +        to present a summary of the source information and resources used
  +        in our component deployment scenario using the -debug command line 
  +        modifier.  
           </p>
   <source><![CDATA[
  -$ merlin tutorial.jar -debug
  +$ merlin -execute target\classes -debug
  +
  +  Version: Merlin SMP 3.0
  +  Environment: Windows NT 4.0 Java 1.4.2
  +  Deployment Home: ${user.dir}/home
  +  Runtime Repository: F:\system\maven
  +  Library Anchor: ${user.dir}
  +  Kernel Path: resource:/kernel.xml
  +  Deployment Blocks: file:/${user.dir}/target/classes/
  +  Override Path:
  +  Server Flag: false
  +  Debug Flag: true
   ]]></source>
  +        
           <p>
  -        The following listing explains the mopre interesting elements 
  -        of the internal deployment deployment process.
  -        </p>
  -        <p>
  -        During the bootstrap of the kernel, the ${merlin.home}/ext directory
  -        is declared as a default directory for extension jar files.  In our 
  -        example this isn't needed, however, if out jar file declared depedencies
  -        on other jar file, the /ext directory is the default location in which
  -        Merlin will look for jar files capable of resolving the dependency.
  +        We can also overide the logging priority for the component using the 
  +        a target override directive.  The behind the scenes activity is 
  +        detailed under the &lt;component-path&gt;.appliance logging category 
  +        as shown below.
           </p>
   <source><![CDATA[
  -[DEBUG  ] (sys): registering system extension descriptor (1)
  -[DEBUG  ] (sys): initialization
  -[DEBUG  ] (sys): resolving system context
  -[DEBUG  ] (sys): including kernel extension dir: F:\system\merlin\ext
  -[DEBUG  ] (sys): including system extension dir: C:\Program Files\Java\j2re1.4.1\lib\ext
  -]]></source>
  -
  -        <p>
  -        During kernel bootstrapping, any jar files including in the classpath 
  -        are automatically scanned for component type declarations. In the following
  -        example, the avalon-assembly-1.0.jar contains a couple of contextualization 
  -        phase handlers that are used internally within Merlin to manage client 
  -        components.
  -        </p>
  +$ merlin -execute target\classes -config conf\config.xml
   
  -<source><![CDATA[
  -[DEBUG  ] (sys): bootstraping from classpath
  -[DEBUG  ] (sys): path: file:/F:/system/merlin/lib/system/merlin-cli-1.0.jar
  -[DEBUG  ] (sys): add: file:/F:/system/merlin/lib/system/merlin-cli-1.0.jar
  -[DEBUG  ] (sys): scanning: file:/F:/system/merlin/lib/system/merlin-cli-1.0.jar
  -[DEBUG  ] (sys): scanning: file:/F:/system/merlin/lib/shared/avalon-assembly-spi-1.0.jar
  -[DEBUG  ] (sys): scanning: file:/F:/system/merlin/lib/shared/avalon-framework-4.1.4.jar
  -[DEBUG  ] (sys): scanning: file:/F:/system/merlin/lib/shared/avalon-meta-spi-1.0.jar
  -[DEBUG  ] (sys): scanning: file:/F:/system/merlin/lib/shared/merlin-spi-1.0.jar
  -[DEBUG  ] (sys): scanning: file:/F:/system/merlin/lib/system/avalon-assembly-1.0.jar
  -[DEBUG  ] (sys.types): add: [context] org.apache.avalon.assembly.lifecycle.impl.AvalonContextuali
  -zer:1.0.0
  -[DEBUG  ] (sys.types): add: [context] org.apache.avalon.assembly.lifecycle.impl.DefaultContextual
  -izer:1.0.0
  -[DEBUG  ] (sys.profiles): add: [context] IMPLICIT
  -[DEBUG  ] (sys.profiles): add: [context] IMPLICIT
  +[DEBUG  ] (tutorial.hello.appliance): assembly phase
  +[DEBUG  ] (tutorial.hello.appliance): deployment (transient) [true]
  +[DEBUG  ] (tutorial.hello.appliance): new instance: 24531886
  +[DEBUG  ] (tutorial.hello.appliance): applying logger to: 24531886
  +[INFO   ] (tutorial.hello): logging
  +[DEBUG  ] (tutorial.hello.appliance): applying initialization to: 24531886
  +[INFO   ] (tutorial.hello): initialization
  +[DEBUG  ] (tutorial.hello.appliance): executing: 24531886
  +[INFO   ] (tutorial.hello): execution
  +[DEBUG  ] (tutorial.hello.appliance): component established: 24531886
  +[DEBUG  ] (tutorial.hello.appliance): activated instance: 24531886
  +[DEBUG  ] (tutorial.hello.appliance): decommissioning phase
  +[DEBUG  ] (tutorial.hello.appliance): component disposal: 24531886
  +[DEBUG  ] (tutorial.hello.appliance): disposing of: 24531886
  +[INFO   ] (tutorial.hello): disposal
  +[DEBUG  ] (tutorial.hello.appliance): destroyed instance: 24531886
  +[DEBUG  ] (tutorial.hello.appliance): dissassembly phase
  +[DEBUG  ] (tutorial.hello.appliance): disposal
   ]]></source>
   
           <p>
  -        Another example of internal component bootstraping is the resolution
  -        of the the StandardBlock, DefaultContainer and DefaultKernel types
  -        which are components used by the Merlin core.
  +        The following information presents the above listing step by step.
           </p>
   
  -<source><![CDATA[
  -[DEBUG  ] (sys): scanning: file:/F:/system/merlin/lib/system/merlin-core-2.1.jar
  -[DEBUG  ] (sys.types): add: [block] org.apache.avalon.merlin.block.impl.StandardBlock:1.0.0
  -[DEBUG  ] (sys.types): add: [container] org.apache.avalon.merlin.container.impl.DefaultContainer:1.0
  -.0
  -[DEBUG  ] (sys.types): add: [kernel] org.apache.avalon.merlin.kernel.impl.DefaultKernel:1.0.0
  -[DEBUG  ] (sys.profiles): add: [block] IMPLICIT
  -[DEBUG  ] (sys.profiles): add: [container] IMPLICIT
  -[DEBUG  ] (sys.profiles): add: [kernel] IMPLICIT
  -]]></source>
  -
           <p>
  -        Once the kernel is bootstrapped the system proceeds with the loading of the 
  -        root block.  In this example the block is supplied as jar file.  Merlin 
  -        scans the jar file for declarted types and profiles.  Component types and 
  -        profiles are then registered into respective registries. Merlin will attempt
  -        to locate deployment templates (called profiles) that are normally packaged
  -        with the componet.  In our example we are declaring an explict profile for 
  -        the HelloComponent through our declaration in the block.xml file.
  +        Launch merlin in execute mode using the "target\classes" directory
  +        as an implicit classpath entry and a deployment scenario defined in
  +        the file target\classes\BLOCK-INF\block.xml.
           </p>
  -
   <source><![CDATA[
  -[DEBUG  ] (sys): ready
  -[DEBUG  ] (sys): installing block: jar:file:/[your-dir]/tutorial.jar!/
  -[DEBUG  ] (sys): target override count: 0
  -[DEBUG  ] (sys): initialization
  -[DEBUG  ] (sys): resolving system context
  -[DEBUG  ] (sys): adding classpath
  -[DEBUG  ] (sys): processing: jar:file:/[your-dir]/tutorial.jar!/
  -[DEBUG  ] (sys): add: jar:file:/[your-dir]/tutorial.jar!/
  -[DEBUG  ] (sys): scanning: jar:file:/[your-dir]/tutorial.jar!/
  -[DEBUG  ] (sys.types): add: [hello] tutorial.HelloComponent:1.0.0
  -[DEBUG  ] (sys.profiles): add: [hello] IMPLICIT
  -[DEBUG  ] (sys): ready
  -[DEBUG  ] (sys.profiles): add: [hello] EXPLICIT
  +$ merlin -execute target\classes -config conf\config.xml
   ]]></source>
   
           <p>
  -        Merlin has now completed the assessment of all available component
  -        types and deployment profiles and is ready to commence the assembly
  -        of the components we have requested in the block.xml file.  The first
  -        component to be assembled is the block that will be used to deploy
  -        the container holding our component.  The block is itself a component 
  -        with a custom contextualization handler.  In order to resolve this 
  -        dependency Merlin has to build and deploy the hander.
  +        The assembly phase checks the component for any service dependencies
  +        and reolves them automatically.  In our demonstration component there 
  +        are not dependencies.  Later tutorials will revisit this aspect.
           </p>
   
   <source><![CDATA[
  -[DEBUG  ] (sys): created appliance: appliance://localhost/tutorial/block
  -[DEBUG  ] (sys): assembly: [block/13419912]
  -[DEBUG  ] (sys): resolving context handler for: [block/13419912]
  -[DEBUG  ] (sys): resolve: [stage org.apache.avalon.assembly.locator.Contextualizable:1.0.0]
  -[DEBUG  ] (sys): created appliance: appliance://localhost/tutorial/context
  -[DEBUG  ] (sys): assembly: [context/20324370]
  -[DEBUG  ] (sys): assembled: [context/20324370] providers: (0)
  -[DEBUG  ] (sys): assigning context strategy handler: [context/20324370]
  -[DEBUG  ] (sys): assembled: [block/13419912] providers: (1) [context/20324370]
  +[DEBUG  ] (tutorial.hello.appliance): assembly phase
   ]]></source>
   
           <p>
  -        Merlin has completed the assembly of the block that will hanlde the 
  -        deployment of our container.  The following 
  -        log entries indicate that an access request has been made for the 
  -        block resulting in the execution of a the lifestyle handler.
  +        As the compoent has been declared in the block.xml file, the default
  +        deployment policy is to deploy it on startup.  In this example the 
  +        component is a transient component with.  The logging message details
  +        the lifestyle and policy re. activation on startup.
           </p>
   
   <source><![CDATA[
  -[DEBUG  ] (sys.lifestyle): access in appliance: [block/13419912]
  -[DEBUG  ] (sys.lifestyle): new instance in appliance: [block/13419912]
  +[DEBUG  ] (tutorial.hello.appliance): deployment (transient) [true]
   ]]></source>
   
  -        <p>
  -        A new instance of the block has been created and Merlin commences
  -        the process of passing the block though its lifecycle stages including
  -        logging channel assignment, contextualization and initalization.
  -        </p>
  -
  -<source><![CDATA[
  -[DEBUG  ] (sys.logging): [block/13419912]
  -[DEBUG  ] (sys.context): activating custom context provider: [context/20324370] for appliance: [bloc
  -k/13419912]
  -[DEBUG  ] (sys.lifestyle): access in appliance: [context/20324370]
  -[DEBUG  ] (sys.lifestyle): new instance in appliance: [context/20324370]
  -[DEBUG  ] (sys.init): [block/13419912]
  -]]></source>
   
           <p>
  -        The block is not established and can take care of the the 
  -        establishment of the Appliance instances (component handlers)
  -        for all of the components explicitly declared and/or implicity
  -        required by our component.
  -        </p>
  -        <p>
  -        Before activating an appliance, Merlin continues to
  -        takes care of resolution of all of the deployment and runtime
  -        dependecies in readiness for subsequent instantiation.  This
  -        process is refered to as the assembly phase.
  +        Deployment commences with the initialization of a new instance.
           </p>
   
   <source><![CDATA[
  -[DEBUG  ] (sys): created appliance: appliance://localhost/tutorial/hello
  -[INFO   ] (sys): commencing block assembly phase
  -[DEBUG  ] (sys): assembly: [hello/10284430]
  -[DEBUG  ] (sys): assembled: [hello/10284430] providers: (0)
  -[DEBUG  ] (sys): listing declared hierachy
  -
  -  appliance://localhost/tutorial/
  -  appliance://localhost/tutorial/hello
  -
  +[DEBUG  ] (tutorial.hello.appliance): new instance: 24531886
   ]]></source>
   
           <p>
  -        With the hierachy logically established, Merlin initates the 
  -        component instantiation.  The following log entries reflect the 
  -        instantiation of the container managed by the block. 
  +        A logger is assigned because the component implements the 
  +        LogEnabled interface.  
           </p>
   
   <source><![CDATA[
  -[DEBUG  ] (sys.lifestyle): access in appliance: [tutorial/11546362]
  -[DEBUG  ] (sys.lifestyle): new instance in appliance: [tutorial/11546362]
  -[DEBUG  ] (sys.logging): [tutorial/11546362]
  -[DEBUG  ] (sys.context): [tutorial/11546362]
  -[DEBUG  ] (sys.init): [tutorial/11546362]
  +[DEBUG  ] (tutorial.hello.appliance): applying logger to: 24531886
  +[INFO   ] (tutorial.hello): logging
   ]]></source>
   
           <p>
  -        With the container established, Merlin hands control to the 
  -        the container to take care of the establishment of the components
  -        it is holding.  This results in an access request for the hello
  -        component which in turn results in the processing of the lifecycle
  -        stages for the component (in this example this includes the assignment
  -        of the logging channel and the initialization of the component (during
  -        which we see the 'I've been initialized!' message).
  +        A component is initialized because it implements the 
  +        Initializable interface.
           </p>
   
   <source><![CDATA[
  -[DEBUG  ] (sys.lifestyle): access in appliance: [hello/10284430]
  -[DEBUG  ] (sys.lifestyle): new instance in appliance: [hello/10284430]
  -[DEBUG  ] (sys.logging): [hello/10284430]
  -[DEBUG  ] (sys.init): [hello/10284430]
  -[INFO   ] (tutorial.hello): I've been initialized!
  -[INFO   ] (sys): Block hierarchy established.
  +[DEBUG  ] (tutorial.hello.appliance): applying initialization to: 24531886
  +[INFO   ] (tutorial.hello): initialization
   ]]></source>
   
           <p>
  -        At this point the block hierachy is established and Merlin 
  -        is simply waiting for a termination request.  Normally the 
  -        components that have been established are responding to event
  -        or requests against ports they are listening on.  To initiate 
  -        the decommissioning phase - type ^C in the window in which 
  -        the merlin session is running.  This will trigger the orderly
  -        decommissioning of the components managed by Merlin.
  +        If the component implemeted the Startable interface it would be 
  +        started at this point.  If it dowes not implement Startable, 
  +        Merlin will check to see if it implements Executable and if so, the 
  +        container invokes execute on the component.
           </p>
   
   <source><![CDATA[
  -[INFO   ] (sys): commencing decommissioning phase
  +[DEBUG  ] (tutorial.hello.appliance): executing: 24531886
  +[INFO   ] (tutorial.hello): execution
  +[DEBUG  ] (tutorial.hello.appliance): component established: 24531886
  +[DEBUG  ] (tutorial.hello.appliance): activated instance: 24531886
   ]]></source>
   
           <p>
  -        Components are decommissioned ahead of containers and in an 
  -        order that ensures that consumer components are decommissioned 
  -        before the source component is decommissioned.
  +        When merlin is launched in execute mode (using the -execute command
  +        line parameter, Merlin automatically initiates container decomissioning
  +        once deployment is complete.  If the -execute parameter is absent, Merlin 
  +        will continue until a ^C interup is encountered.
           </p>
   
  -<source><![CDATA[
  -[INFO   ] (sys): commencing decommissioning phase
  -[DEBUG  ] (sys): disassemble: [hello/10284430]
  -[DEBUG  ] (sys): termination: [hello/10284430]
  -[DEBUG  ] (sys.lifestyle): release: [hello/10284430]
  -[DEBUG  ] (sys): disassemble: [hello/10284430]
  -]]></source>
  -
           <p>
  -        Once component decommissioning is complete, Merlin 
  -        containues with the decommissioning of the container
  -        hierachy.
  +        Decommissioning of a component involves stopping the compoent if it 
  +        implements the Startable interface, foloowed by component disposal.
           </p>
   
   <source><![CDATA[
  -[DEBUG  ] (sys.lifestyle): release: [tutorial/11546362]
  -[DEBUG  ] (sys.disposal): disposal [tutorial/11546362]
  -]]></source>
  +[DEBUG  ] (tutorial.hello.appliance): decommissioning phase
  +[DEBUG  ] (tutorial.hello.appliance): component disposal: 24531886
  +[DEBUG  ] (tutorial.hello.appliance): disposing of: 24531886
  +[INFO   ] (tutorial.hello): disposal
  +[DEBUG  ] (tutorial.hello.appliance): destroyed instance: 24531886
   
           <p>
  -        And finally - exits.
  +        Internally the appliance instance managing the deployment scenario
  +        is taken down during which is is dissassembled and disposed of.
           </p>
   
  -<source><![CDATA[
  -[INFO   ] (sys): bye
  +[DEBUG  ] (tutorial.hello.appliance): dissassembly phase
  +[DEBUG  ] (tutorial.hello.appliance): disposal
   ]]></source>
   
         </subsection>
  +
  +      <p>
  +      We are now ready to move onto the next series of tutorials dealing 
  +      with <a href="config/index.html">component configuration management</a>.
  +      </p>
  +
       </section>
     </body>
   
  
  
  
  1.3       +37 -6     avalon-sandbox/merlin/merlin-platform/xdocs/starting/tutorial/services.xml
  
  Index: services.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/merlin-platform/xdocs/starting/tutorial/services.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- services.xml	4 Jul 2003 11:31:38 -0000	1.2
  +++ services.xml	23 Aug 2003 02:23:30 -0000	1.3
  @@ -14,7 +14,7 @@
           One of the most important aspects of a component management 
           platform is the ability to provide component assembly.  Assembly
           is achieved by wiring together the services provides by one component
  -        with the service depndencies declared by a consumer component. 
  +        with the service dependencies declared by a consumer component. 
           </p>
           <p>
           This tutorial presents the creation of a simple component that 
  @@ -23,7 +23,7 @@
           </p>
           <p>
           Resource supporting this tutorial are contained in the 
  -        turorial/dependencies package.
  +        turorials/dependencies/ package.
           </p>
         </subsection>
         <subsection name="Service Interface">
  @@ -61,35 +61,66 @@
   
   import java.util.Random;
   
  +import org.apache.avalon.framework.logger.AbstractLogEnabled;
  +import org.apache.avalon.framework.activity.Initializable;
  +import org.apache.avalon.framework.activity.Disposable;
  +
   /**
    * An implementation of a random number generator.
  + *
  + * @avalon.component version="1.0" name="random" lifestyle="singleton"
  + * @avalon.service type="tutorial.RandomGenerator" version="1.0"
    */
  -public class RandomGeneratorProvider implements RandomGenerator
  +public class RandomGeneratorProvider extends AbstractLogEnabled 
  +  implements Initializable, RandomGenerator, Disposable
   {
   
       private Random m_random = new Random();
   
  +    public void initialize()
  +    {
  +        getLogger().info( "initialization" );
  +    }
  +
      /**
       * Return a random integer
       * @return the random number
       */
       public int getRandom()
       {
  +        getLogger().info( "processing request" );
           return m_random.nextInt();
       }
  +
  +    public void dispose()
  +    {
  +        getLogger().info( "disposal" );
  +    }
  +
   }
   </source>
           <p>
  -          In addition to the implementation, we need to create an xinfo
  +          In addition to the component implementation, we need to generate an xinfo
             resource in which we declare the publication of the service by 
             the component.  In this example the component type is declaring 
  -          one service although multiple service declaration are supported.
  +          one service although multiple service declaration are supported. This 
  +          is generated automatically based on the following tag:
  +        </p>
  +<source><![CDATA[
  + * @avalon.service type="tutorial.RandomGenerator" version="1.0"
  +]]></source>
  +        <p>
  +          The type descriptor generated for this component is listed below.
           </p>
           <p><i>RandomGeneratorProvider.xinfo</i></p>
   <source><![CDATA[
  +<?xml version="1.0"?>
  +<!DOCTYPE type
  +      PUBLIC "-//AVALON/Type DTD Version 1.0//EN"
  +             "http://avalon.apache.org/dtds/meta/type_1_1.dtd" >
   <type>
     <info>
  -    <name>random</name>
  +    <name>random-provider</name>
       <version>1.0</version>
     </info>
     <services>
  
  
  
  1.4       +16 -7     avalon-sandbox/merlin/merlin-platform/xdocs/starting/tutorial/config/block.xml
  
  Index: block.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/merlin-platform/xdocs/starting/tutorial/config/block.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- block.xml	17 Aug 2003 04:19:15 -0000	1.3
  +++ block.xml	23 Aug 2003 02:23:31 -0000	1.4
  @@ -11,8 +11,8 @@
       <section name="Using Merlin">
         <subsection name="Declaring a configuration in the Component Directive">
           <p>
  -        We can modify the configuration behaviour at a more general level
  -        by including an overriding configuration within the block.xml directive.
  +        We can modify the configuration behaviour by including a configuration 
  +        within the block.xml deployment directive.
           </p>
           <p>
           Resources supporting this turorial are contained in the 
  @@ -21,7 +21,7 @@
   <source><![CDATA[
   <container name="hello">
   
  -     <component name="hello" class="tutorial.HelloComponent" activation="startup">
  +     <component name="hello" class="tutorial.HelloComponent">
          <configuration>
            <source>explicit configuration within block</source>
          </configuration>
  @@ -32,10 +32,9 @@
           <p>
           Build and run the tutorial again.
           </p>
  -        <source>
  -$ maven clean jar
  -$ merlin target\classes -execute
  -        </source>
  +<source>
  +$ merlin -execute target\classes
  +</source>
           <p>
           In the logging output we see that the configuration
           supplied to the component has been overrided by the 
  @@ -49,6 +48,16 @@
           </source>
   
         </subsection>
  +      <subsection name="Using Defaults">
  +
  +        <p>
  +        The <a href="defaults.html">next tutorial</a> shows how 
  +        Merlin provides support for the packaging of default 
  +        configurations with a component.
  +        </p>
  +
  +      </subsection>
  +
       </section>
     </body>
   
  
  
  
  1.3       +9 -27     avalon-sandbox/merlin/merlin-platform/xdocs/starting/tutorial/config/configurable.xml
  
  Index: configurable.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/merlin-platform/xdocs/starting/tutorial/config/configurable.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- configurable.xml	15 Jun 2003 17:43:24 -0000	1.2
  +++ configurable.xml	23 Aug 2003 02:23:31 -0000	1.3
  @@ -19,22 +19,13 @@
           </p>
           <p>
           Resources supporting this turorial are contained in the 
  -        tutorial/configuration/simple directory.
  +        tutorials/configuration/block/ directory.
           </p>
   <source>
  -package tutorial;
  -
  -import org.apache.avalon.framework.logger.AbstractLogEnabled;
  -import org.apache.avalon.framework.activity.Initializable;
  -import org.apache.avalon.framework.configuration.Configurable;
  -import org.apache.avalon.framework.configuration.Configuration;
  -import org.apache.avalon.framework.configuration.ConfigurationException;
  -
   /**
    * A configurable component.
    *
  - * @avalon.meta.version 1.0
  - * @avalon.meta.name simple
  + * @avalon.component version="1.0" name="simple"
    */
   public class HelloComponent extends AbstractLogEnabled 
     implements Configurable, Initializable
  @@ -68,24 +59,15 @@
       }
   }
   </source>
  +
  +      </subsection>
  +      <subsection name="Declaring a Configuration">
  +
           <p>
  -        Build and run the tutorial without declaring any configuration.
  -        </p>
  -        <source>
  -$ maven clean jar
  -$ merlin target\classes -execute
  -        </source>
  -        <p>
  -        In the logging output we see that Merlin has created and 
  -        supplied an empty configuration to the component.
  +        A number of different approach to controllling the confiugration 
  +        that is supplied to a component are presented in the <a href="block.html">next 
  +        turorial</a>.
           </p>
  -        <source>
  -$ ant jar
  -$ merlin build\classes
  -[INFO   ] (tutorial.hello): configuration stage
  -[INFO   ] (tutorial.hello): initialization stage
  -[INFO   ] (tutorial.hello): source: unknown
  -        </source>
   
         </subsection>
       </section>
  
  
  
  1.3       +15 -4     avalon-sandbox/merlin/merlin-platform/xdocs/starting/tutorial/config/defaults.xml
  
  Index: defaults.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/merlin-platform/xdocs/starting/tutorial/config/defaults.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- defaults.xml	15 Jun 2003 17:43:24 -0000	1.2
  +++ defaults.xml	23 Aug 2003 02:23:31 -0000	1.3
  @@ -18,7 +18,7 @@
           </p>
           <p>
           Resources supporting this turorial are contained in the 
  -        tutorial/configuration/defaults directory.
  +        tutorials/configuration/defaults/ directory.
           </p>
   
           <p><i>HelloComponent.xconfig</i></p>
  @@ -32,8 +32,7 @@
           Build and run the tutorial again.
           </p>
           <source>
  -$ maven clean jar
  -$ merlin build\classes -execute
  +$ merlin -execute target\classes
           </source>
           <p>
           In the logging output we see that the configuration
  @@ -47,7 +46,19 @@
           </source>
   
         </subsection>
  -    </section>
  +      <subsection name="Using Target Overrides">
  +
  +        <p>
  +        The <a href="override.html">next tutorial</a> shows how 
  +        you can modify configurations via declaration of a set 
  +        configuration override targets.  This is usefull when 
  +        you have a packaged deployment scenario and you want to 
  +        override/suppliment the configuration with different 
  +        information (such as host name, username, passwords, etc.).
  +        </p>
  +
  +      </subsection>
  +     </section>
     </body>
   
   </document>
  
  
  
  1.2       +1 -1      avalon-sandbox/merlin/merlin-platform/xdocs/starting/tutorial/config/navigation.xml
  
  Index: navigation.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/merlin-platform/xdocs/starting/tutorial/config/navigation.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- navigation.xml	10 Jun 2003 02:14:35 -0000	1.1
  +++ navigation.xml	23 Aug 2003 02:23:31 -0000	1.2
  @@ -19,8 +19,8 @@
             <item name="Behind the Scenes" href="/starting/tutorial/internal.html"/>
             <item name="Configurations" href="/starting/tutorial/config/index.html">
               <item name="Using" href="/starting/tutorial/config/configurable.html"/>
  -            <item name="Defaults" href="/starting/tutorial/config/defaults.html"/>
               <item name="Declaration" href="/starting/tutorial/config/block.html"/>
  +            <item name="Defaults" href="/starting/tutorial/config/defaults.html"/>
               <item name="Overriding" href="/starting/tutorial/config/override.html"/>
             </item>
             <item name="Contextualization" href="/starting/tutorial/context/index.html"/>
  
  
  
  1.3       +11 -4     avalon-sandbox/merlin/merlin-platform/xdocs/starting/tutorial/config/override.xml
  
  Index: override.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/merlin-platform/xdocs/starting/tutorial/config/override.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- override.xml	15 Jun 2003 17:43:24 -0000	1.2
  +++ override.xml	23 Aug 2003 02:23:31 -0000	1.3
  @@ -26,7 +26,7 @@
         <subsection name="Target Override Format">
   <source><![CDATA[
   <targets>
  -  <target path="/hello">
  +  <target path="/tutorial/hello">
       <configuration>
         <source>External configuration target.</source>
       </configuration>
  @@ -41,8 +41,7 @@
           in the tutorials/configuration package).
           </p>
           <source>
  -$ maven clean jar
  -$ merlin -config conf\config.xml target\classes 
  +$ merlin -execute target\classes -config conf\config.xml 
           </source>
           <p>
           Executing Merlin demonstrates that the configuration supplied
  @@ -60,7 +59,7 @@
           Configuration target names represent a path.  The path is the 
           construction of container names seperated by the "/" character
           and ending with a component name.  For example if the hello component
  -        were container within a container named "container" the path would 
  +        were contained within a container named "container" the path would 
           appear as follows: 
           </p>
   <source><![CDATA[
  @@ -72,6 +71,14 @@
     </target>
   </targets>
   ]]></source>
  +      </subsection>
  +      <subsection name="Declaring a Configuration">
  +
  +        <p>
  +        We are now ready to move on to the subject of 
  +        <a href="../context/index.html">context management</a>.
  +        </p>
  +
         </subsection>
       </section>
     </body>
  
  
  
  1.5       +12 -0     avalon-sandbox/merlin/merlin-platform/xdocs/starting/tutorial/context/casting.xml
  
  Index: casting.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/merlin-platform/xdocs/starting/tutorial/context/casting.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- casting.xml	18 Aug 2003 17:02:37 -0000	1.4
  +++ casting.xml	23 Aug 2003 02:23:31 -0000	1.5
  @@ -250,6 +250,18 @@
   </source>
   
         </subsection>
  +
  +      <subsection name="Next Steps">
  +
  +        <p>
  +        The advanced tutorial provides information about the creation of a  
  +        <a href="../../advanced/context.html">custom contextualization strategies</a>.
  +        Alternatively, you can move onto the subject of 
  +        <a href="../services.html">service publication</a>.
  +        </p>
  +
  +      </subsection>
  +
       </section>
     </body>
   
  
  
  
  1.4       +53 -25    avalon-sandbox/merlin/merlin-platform/xdocs/starting/tutorial/context/entries.xml
  
  Index: entries.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/merlin-platform/xdocs/starting/tutorial/context/entries.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- entries.xml	17 Aug 2003 04:19:15 -0000	1.3
  +++ entries.xml	23 Aug 2003 02:23:31 -0000	1.4
  @@ -18,7 +18,7 @@
           </p>
           <p>
           Resource supporting this tutorial are contained in the 
  -        turorial/context_custom package.
  +        turorial/context/custom/ package.
           </p>
         </subsection>
   
  @@ -32,7 +32,7 @@
             with an existing code base.
           </p>
           <p>
  -          Our non-componet example NumberCruncher takes two values
  +          Our non-component example NumberCruncher takes two values
             in a constructor and returns the result of the multiplication
             of the two number via an accessor.  While not very useful, the  
             purpose of NumberCruncher is to demonstrate how you can use 
  @@ -42,7 +42,7 @@
           <p>
             <i>NumberCruncher.java</i>
           </p>
  -        <source>
  +<source>
   package tutorial;
   
   /**
  @@ -69,7 +69,7 @@
          return ( m_secondary * m_primary );
       }
   }
  -        </source>
  +</source>
         </subsection>
   
         <subsection name="Updating HelloComponent.xinfo">
  @@ -80,17 +80,17 @@
           </p>
           <p><i>HelloComponent.xinfo</i></p>
   <source><![CDATA[
  -<?xml version="1.0"?>
  -<!DOCTYPE type
  -      PUBLIC "-//AVALON/Type DTD Version 1.0//EN"
  -             "http://avalon.apache.org/dtds/meta/type_1_1.dtd" >
  +<?xml version="1.0" encoding="ISO-8859-1"?>
  +<!DOCTYPE type PUBLIC "-//AVALON/Type DTD Version 1.0//EN" "http://avalon.apache.org/dtds/meta/type_1_1.dtd" >
  +
   <type>
     <info>
  -    <name>hello</name>
  -    <version>1.0</version>
  +    <name>demo</name>
  +    <version>-1.0.0</version>
  +    <lifestyle>transient</lifestyle>
     </info>
     <context>
  -    <entry key="cruncher" type="tutorial.NumberCruncher"/>
  +    <entry key="cruncher" type="tutorial.NumberCruncher" />
     </context>
   </type>
   ]]></source>
  @@ -109,6 +109,11 @@
   import org.apache.avalon.framework.context.Context;
   import org.apache.avalon.framework.context.ContextException;
   
  +/**
  + * Demonstration of a component that uses a constructed context entry.
  + * 
  + * @avalon.component name="demo"
  + */
   public class HelloComponent extends AbstractLogEnabled 
     implements Contextualizable
   {
  @@ -117,6 +122,9 @@
       * Contextualization of the component by the container.
       * The context supplied by the container shall contain
       * a NumberCruncher instance as declared in the xinfo resource.
  +    *
  +    * @avalon.context
  +    * @avalon.entry key="cruncher" type="tutorial.NumberCruncher"
       */
       public void contextualize( Context context )
         throws ContextException
  @@ -141,26 +149,37 @@
           </p>
           <p><i>block.xml</i></p>
   <source><![CDATA[
  -   <container name="tutorial">
  -     <component name="hello" class="tutorial.HelloComponent" activation="startup">
  -       <context>
  -         <entry key="cruncher">
  -           <param class="tutorial.NumberCruncher">
  -             <param class="java.lang.Integer">7</param>
  -             <param class="java.lang.Double">1.5</param>
  -           </param>
  -         </entry>
  -       </context>
  -     </component>
  -   </container>
  +<container name="tutorial">
  +
  +   <classloader>
  +     <classpath>
  +       <repository>
  +         <resource id="avalon-framework:avalon-framework-impl" version="SNAPSHOT"/>
  +       </repository>
  +     </classpath>
  +   </classloader>
  +
  +
  +   <component name="hello" class="tutorial.HelloComponent">
  +     <context>
  +       <entry key="cruncher">
  +         <constructor class="tutorial.NumberCruncher">
  +           <param class="java.lang.Integer">7</param>
  +           <param class="java.lang.Double">1.5</param>
  +         </constructor>
  +       </entry>
  +     </context>
  +   </component>
  +
  +</container>
   ]]></source>
   
           <p>
           Build and run the tutorial.
           </p>
           <source>
  -$ ant jar
  -$ merlin build\classes
  +$ maven
  +$ merlin -execute target\classes
           </source>
           <p>
           In the logging output we see that Merlin has created and 
  @@ -169,8 +188,17 @@
           <source>
   [INFO   ] (tutorial.hello): result: 10.5
           </source>
  +      </subsection>
  +
  +      <subsection name="Context Casting">
  +
  +        <p>
  +        The <a href="casting.html">next tutorial</a> shows how 
  +        Merlin provides support for type-safe context casting.
  +        </p>
   
         </subsection>
  +
       </section>
     </body>
   
  
  
  
  1.3       +32 -17    avalon-sandbox/merlin/merlin-platform/xdocs/starting/tutorial/context/standard.xml
  
  Index: standard.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/merlin-platform/xdocs/starting/tutorial/context/standard.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- standard.xml	18 Aug 2003 17:02:37 -0000	1.2
  +++ standard.xml	23 Aug 2003 02:23:31 -0000	1.3
  @@ -16,7 +16,7 @@
           </p>
           <p>
           Resource supporting this tutorial are contained in the 
  -        turorials/context_standard package.
  +        turorials/context/avalon/ package.
           </p>
         </subsection>
   
  @@ -24,9 +24,9 @@
           <p>
           In order to receive a runtime context we need to update the 
           HelloComponent source so that it implements the Avalon 
  -        Contextualization stage interface.  Merlin will build and 
  -        supply a context object containing the following four 
  -        context entries:
  +        Contextualizable lifecycle stage interface.  Merlin will 
  +        build and supply a context object containing the following  
  +        four context entries:
           </p>
           <p><i>Merlin Standard Context Entries</i></p>
           <table>
  @@ -73,6 +73,10 @@
   import org.apache.avalon.framework.context.Context;
   import org.apache.avalon.framework.context.ContextException;
   
  +/**
  + * Component demonstrating access to standard context entries.
  + * @avalon.component name="demo"
  + */
   public class HelloComponent extends AbstractLogEnabled 
     implements Contextualizable
   {
  @@ -87,6 +91,12 @@
       * The context supplied by the container holds the 
       * Merlin standard context entries for the home and 
       * working directories, component name and partition.
  +    *
  +    * @avalon.context
  +    * @avalon.entry key="urn:avalon:name" 
  +    * @avalon.entry key="urn:avalon:partition" 
  +    * @avalon.entry key="urn:avalon:home" type="java.io.File"
  +    * @avalon.entry key="urn:avalon:temp" type="java.io.File"
       */
       public void contextualize( Context context )
         throws ContextException
  @@ -96,10 +106,6 @@
           m_name = (String) context.get( "urn:avalon:name" );
           m_partition = (String) context.get( "urn:avalon:partition" );
   
  -        //
  -        // log the standard values
  -        //
  -
           StringBuffer buffer = new StringBuffer( "standard context entries" );
           buffer.append( "\n  name: " + m_name );
           buffer.append( "\n  home: " + m_home );
  @@ -114,21 +120,30 @@
           <p>
           Build and run the tutorial.
           </p>
  -        <source>
  -$ ant jar
  -$ merlin build\classes
  -        </source>
  +<source>
  +$ maven
  +$ merlin -execute target\classes
  +</source>
           <p>
           In the logging output we see the values provided by 
           Merlin to the component.
           </p>
  -        <source>
  +<source>
   [INFO   ] (tutorial.hello): standard context entries
     name: hello
  -  home: F:\tutorial\working\home\hello
  -  temp: F:\tutorial\workin\temp\hello
  -  partition: /tutorial/hello
  -        </source>
  +  home: F:\dev\avalon-sandbox\merlin\merlin-platform\tutorials\context\avalon\home\tutorial\hello
  +  temp: C:\TEMP\tutorial\hello
  +  partition: /tutorial/
  +</source>
  +      </subsection>
  +
  +      <subsection name="Using Defaults">
  +
  +        <p>
  +        The <a href="entries.html">next tutorial</a> shows how 
  +        Merlin provides support for creating custom context entries.
  +        </p>
  +
         </subsection>
       </section>
     </body>
  
  
  

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


Mime
View raw message