mcconnell    2003/08/23 11:13:51

  Modified:    merlin/composition-spi/src/java/org/apache/avalon/composition/util
                        StringHelper.java
               merlin/merlin-platform/xdocs/starting/tutorial execution.xml
                        internal.xml
  Log:
  Housekeeping.
  
  Revision  Changes    Path
  1.3       +45 -2     
avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/util/StringHelper.java
  
  Index: StringHelper.java
  ===================================================================
  RCS file: 
/home/cvs/avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/util/StringHelper.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- StringHelper.java 23 Aug 2003 17:55:31 -0000      1.2
  +++ StringHelper.java 23 Aug 2003 18:13:51 -0000      1.3
  @@ -68,37 +68,72 @@
       private static final String MERLIN_HOME = getMerlinHome();
       private static final String MERLIN_REPO_LOCAL = getRepositoryLocal();
   
  +   /**
  +    * Parse a supplied string for patterns matching ${user.dir}, ${merlin.home}, 
  +    * and ${merlin.repository.local} and return the string using the symbolic 
  +    * representation.
  +    *
  +    * @param name the string to parse
  +    * @return the parsed string
  +    */
       public static String toString( String name )
       {
           if( name == null ) return "";
           String str = name.replace( '\\', '/' );
  +
           if( str.indexOf( USER_DIR ) > -1 )
           {
               str = getString( str, USER_DIR, "${user.dir}" );
           }
  +
           if( ( MERLIN_HOME != null ) && str.indexOf( MERLIN_HOME ) > -1 )
           {
               str = getString( str, MERLIN_HOME, "${merlin.home}" );
           }
  -        if( ( MERLIN_REPO_LOCAL != null ) && str.indexOf( MERLIN_REPO_LOCAL ) > -1 )
  +        else if( ( MERLIN_REPO_LOCAL != null ) && str.indexOf( MERLIN_REPO_LOCAL ) 
> -1 )
           {
               str = getString( str, MERLIN_REPO_LOCAL, "${merlin.repository.local}" );
           }
  +
           return str;
       }
   
  -    public static String toString( File file )
  +   /**
  +    * Parse a supplied file for patterns matching ${user.dir}, ${merlin.home}, 
  +    * and ${merlin.repository.local} and return the string using the symbolic 
  +    * representation.
  +    *
  +    * @param file the file to parse
  +    * @return the parsed string
  +    */
  +   public static String toString( File file )
       {
           if( file == null ) return "";
           return toString( file.toString() );
       }
   
  +   /**
  +    * Parse a supplied url for patterns matching ${user.dir}, ${merlin.home}, 
  +    * and ${merlin.repository.local} and return the string using the symbolic 
  +    * representation.
  +    *
  +    * @param url the url to parse
  +    * @return the parsed string
  +    */
       public static String toString( URL url )
       {
           if( url == null ) return "";
           return toString( url.toString() );
       }
   
  +   /**
  +    * Parse a supplied url sequence for patterns matching ${user.dir}, 
${merlin.home}, 
  +    * and ${merlin.repository.local} and return a string using the symbolic 
  +    * representation.
  +    *
  +    * @param urls the urls to parse
  +    * @return the parsed string
  +    */
       public static String toString( URL[] urls )
       {
           StringBuffer buffer = new StringBuffer();
  @@ -110,6 +145,14 @@
           return buffer.toString();
       }
   
  +   /**
  +    * Parse a supplied string sequence for patterns matching ${user.dir}, 
${merlin.home}, 
  +    * and ${merlin.repository.local} and return a string using the symbolic 
  +    * representation.
  +    *
  +    * @param names the urls to parse
  +    * @return the parsed string
  +    */
       public static String toString( String[] names )
       {
           StringBuffer buffer = new StringBuffer();
  
  
  
  1.4       +2 -2      
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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- execution.xml     23 Aug 2003 02:23:30 -0000      1.3
  +++ execution.xml     23 Aug 2003 18:13:51 -0000      1.4
  @@ -22,9 +22,9 @@
         <subsection name="Running the Block">
           <p>
   To see Merlin in action, execute Merlin and give it either the 
  -jar file of the target/classes directory as the deployment 
  +jar file or the ${basedir}/target/classes directory as the deployment 
   argument.  The following command deploys the component relative
  -to the compiled classes in the target/classes directory.
  +to the compiled classes in the ${basedir}/target/classes directory.
           </p>
   <source><![CDATA[
   $ merlin -execute target\classes 
  
  
  
  1.4       +39 -22    
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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- internal.xml      23 Aug 2003 09:53:03 -0000      1.3
  +++ internal.xml      23 Aug 2003 18:13:51 -0000      1.4
  @@ -29,6 +29,11 @@
     Override Path:
     Server Flag: false
     Debug Flag: true
  +
  +[INFO   ] (tutorial.hello): logging
  +[INFO   ] (tutorial.hello): initialization
  +[INFO   ] (tutorial.hello): execution
  +[INFO   ] (tutorial.hello): disposal
   ]]></source>
           
         </subsection>
  @@ -36,7 +41,18 @@
   
           <p>
           We can also override the logging priority for the component using the 
  -        a target override directive.  The behind the scenes activity is 
  +        a target override directive.  
  +        </p>
  +        <p><i>${basedir}\conf\config.xml</i></p>
  +<source><![CDATA[
  +<targets>
  +  <target path="/tutorial/hello">
  +    <categories priority="DEBUG"/>
  +  </target>
  +</targets>
  +]]></source>
  +        <p>
  +        The behind the scenes activity is 
           detailed under the &lt;component-path&gt;.appliance logging category 
           as shown below.
           </p>
  @@ -64,11 +80,6 @@
   ]]></source>
   
           <p>
  -        Using the debug command line parmeter generates debug level information
  -        for internal kernel, containers and components.        
  -        </p>
  -
  -        <p>
           The following information presents the above listing step by step.
           </p>
   
  @@ -175,11 +186,12 @@
   
         </subsection>
   
  -      <subsection name="Deep trace using -debug">
  +      <subsection name="The -debug command line switch">
   
         <p>
         For a really deep look inside Merlin, you can select the -debug command
  -      line switch.
  +      line switch.  Some of the addition information visible here includes the 
  +      setup of classloaders
         </p>
   
   <source><![CDATA[
  @@ -203,14 +215,19 @@
   [DEBUG  ] (kernel.tutorial): implicit entries: 1
   [DEBUG  ] (kernel.tutorial): repository declarations: 1
   [DEBUG  ] (kernel.tutorial): repository 0 contains 1 entries.
  -[DEBUG  ] (kernel.tutorial.classloader): classpath: 
file:/${user.dir}/target/classes/;
  
-file:/F:/system/maven/repository/avalon-framework/jars/avalon-framework-impl-SNAPSHOT.jar
  -[DEBUG  ] (kernel.tutorial.classloader.scanner): scanning: 
file:/${user.dir}/target/classes/
  +[DEBUG  ] (kernel.tutorial.classloader): classpath: 
  +  file:/${user.dir}/target/classes/;
  +  file:/${merlin.home}/repository/avalon-framework/jars/
  +    avalon-framework-impl-SNAPSHOT.jar
  +[DEBUG  ] (kernel.tutorial.classloader.scanner): scanning: 
  +file:/${user.dir}/target/classes/
   [DEBUG  ] (kernel.tutorial.classloader.scanner): type: tutorial.HelloComponent
   [DEBUG  ] (kernel.tutorial.classloader.scanner): scanning: 
  
-file:/F:/system/maven/repository/avalon-framework/jars/avalon-framework-impl-SNAPSHOT.jar
  +  file:/${merlin.home}/repository/avalon-framework/
  +jars/avalon-framework-impl-SNAPSHOT.jar
   [DEBUG  ] (kernel.tutorial.classloader.types): type install count: 1
  -[DEBUG  ] (kernel.tutorial.classloader.types): registered 
[type:tutorial.HelloComponent/1].
  +[DEBUG  ] (kernel.tutorial.classloader.types): registered 
  +  [type:tutorial.HelloComponent/1].
   [DEBUG  ] (kernel.tutorial): installing: hello
   [DEBUG  ] (kernel): customization phase
   [DEBUG  ] (kernel): composition phase
  @@ -227,23 +244,23 @@
   [DEBUG  ] (): deployment: block:/tutorial
   [DEBUG  ] (tutorial): deployment: appliance:/tutorial/hello
   [DEBUG  ] (tutorial.hello.appliance): deployment (transient) [true]
  -[DEBUG  ] (tutorial.hello.appliance): new instance: 19627754
  -[DEBUG  ] (tutorial.hello.appliance): applying logger to: 19627754
  +[DEBUG  ] (tutorial.hello.appliance): new instance: 10040639
  +[DEBUG  ] (tutorial.hello.appliance): applying logger to: 10040639
   [INFO   ] (tutorial.hello): logging
  -[DEBUG  ] (tutorial.hello.appliance): applying initialization to: 19627754
  +[DEBUG  ] (tutorial.hello.appliance): applying initialization to: 10040639
   [INFO   ] (tutorial.hello): initialization
  -[DEBUG  ] (tutorial.hello.appliance): executing: 19627754
  +[DEBUG  ] (tutorial.hello.appliance): executing: 10040639
   [INFO   ] (tutorial.hello): execution
  -[DEBUG  ] (tutorial.hello.appliance): component established: 19627754
  -[DEBUG  ] (tutorial.hello.appliance): activated instance: 19627754
  +[DEBUG  ] (tutorial.hello.appliance): component established: 10040639
  +[DEBUG  ] (tutorial.hello.appliance): activated instance: 10040639
   [INFO   ] (kernel): decommissioning phase
   [DEBUG  ] (): decommissioning: block:/tutorial
   [DEBUG  ] (tutorial): decommissioning: appliance:/tutorial/hello
   [DEBUG  ] (tutorial.hello.appliance): decommissioning phase
  -[DEBUG  ] (tutorial.hello.appliance): component disposal: 19627754
  -[DEBUG  ] (tutorial.hello.appliance): disposing of: 19627754
  +[DEBUG  ] (tutorial.hello.appliance): component disposal: 10040639
  +[DEBUG  ] (tutorial.hello.appliance): disposing of: 10040639
   [INFO   ] (tutorial.hello): disposal
  -[DEBUG  ] (tutorial.hello.appliance): destroyed instance: 19627754
  +[DEBUG  ] (tutorial.hello.appliance): destroyed instance: 10040639
   [INFO   ] (kernel): dissassembly phase
   [DEBUG  ] (): dissassembly phase
   [DEBUG  ] (tutorial): dissassembly phase
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to