mcconnell    02/03/14 02:32:03

  Modified:    enterprise/tools build.xml
               enterprise/tools/lib merlin.jar
               enterprise/tools/src/etc loader.mf
  Added:       enterprise/tools/src/etc overview.html
  Log:
  no message
  
  Revision  Changes    Path
  1.9       +4 -4      jakarta-avalon-apps/enterprise/tools/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/enterprise/tools/build.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- build.xml 12 Mar 2002 22:17:03 -0000      1.8
  +++ build.xml 14 Mar 2002 10:32:03 -0000      1.9
  @@ -52,7 +52,7 @@
     <property name="javadoc.root.path"  value="${dist}/javadoc" />
     <property name="avalon.href"  
value="http://jakarta.apache.org/avalon/api/"; />
     <property name="jdk.href"  value="http://java.sun.com/j2se/1.4/docs/api/"; 
/>
  -  <property name="overview.html" value="${tools.path}/etc/overview.html" />
  +  <property name="overview.html" value="${etc}/overview.html" />
   
     <!-- demo configuration -->
     
  @@ -181,14 +181,14 @@
     </target>
   
     <target name="javadoc" depends="prepare" >
  -    <mkdir dir="${javadoc.root.path}" />
  -    <copy todir="${javadoc.root.path}/">
  +    <mkdir dir="${javadoc.root.path}/${ant.project.name}" />
  +    <copy todir="${javadoc.root.path}/${ant.project.name}">
          <fileset dir="${etc}">
            <include name="LICENSE.HTML"/>
            <include name="license.css"/>
          </fileset>
       </copy>
  -    <javadoc destdir="${javadoc.root.path}" 
  +    <javadoc destdir="${javadoc.root.path}/${ant.project.name}" 
        doctitle="&lt;h1&gt;Merlin Service Management&lt;/h1&gt;" 
         noindex="false" author="false" 
         use="true"
  
  
  
  1.11      +19 -17    jakarta-avalon-apps/enterprise/tools/lib/merlin.jar
  
        <<Binary file>>
  
  
  1.2       +2 -0      jakarta-avalon-apps/enterprise/tools/src/etc/loader.mf
  
  Index: loader.mf
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/enterprise/tools/src/etc/loader.mf,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- loader.mf 3 Mar 2002 15:45:58 -0000       1.1
  +++ loader.mf 14 Mar 2002 10:32:03 -0000      1.2
  @@ -2,3 +2,5 @@
   Main-Class: org.apache.avalon.excalibur.service.ServiceLoader
   Class-Path: avalon-framework.jar logkit-1.0.jar
   
  +Name: org/apache/excalibur/service/ServiceLoader.class
  +Avalon-Block: true
  
  
  
  1.1                  
jakarta-avalon-apps/enterprise/tools/src/etc/overview.html
  
  Index: overview.html
  ===================================================================
  <body> 
  <h3>Package Description</h3>
  <p>
  Framework extensions supporting service management.  The primary package
  resource is the ServiceLoader class which handles dynamic service loading,
  configuration, contextualization, automated service composition, dependent 
  service management, and service decommissioning.
  </p>
  
  <p><table border="1" cellpadding="3" cellspacing="0" width="100%">
  <tr bgcolor="#ccccff">
  <td colspan="2"><font size="+2"><b>Components</b></font></td>
  <tr><td width="20%" valign="top"><strong>[EMAIL PROTECTED] 
org.apache.avalon.excalibur.service.ServiceLoader}</strong></td>
  <td>The <code>ServiceLoader</code> component support for the loading, log 
enablement, runtime context management, 
  supply of static configuration information profils, composition of dependent 
services, and service decommissioning.
  The <coe>ServiceLoader</code> is executable via the command line (as a jar 
file or class invocation), as a classic 
  component managed by a container, or executed as an Ant task.</td></tr>
  </table>
  
  <h3>Overview</h3>
  
  <table border="1" cellpadding="3" cellspacing="0" width="100%">
  <tr bgcolor="#ccccff">
  <td colspan="2"><b><font size="+2">Features Summary</b></font></td>
  <tr><td width="20%"><b>Feature</b></td>
  <td><b>Description</b></td></tr>
  
  <tr><td valign="top">Service Composition</td>
  <td>Handles automated composition of services based on declared component 
dependencies.</td></tr>
  <tr><td valign="top">Default Configurations</td>
  <td>Provides support for configuration using component default configurations 
together
  with supplied configuration information using the CascadingConfiguration 
model.</td></tr>
  <tr><td valign="top">Mixed execution modes</td>
  <td>Supports execution from the command line (main method), as a jar file, as 
an Ant task,
  and as an embedded component.
      <p><strong>java -jar form</strong></p>
      <p>Execution using java -jar pattern requires the presence 
      of the following files under the same directory:</p>
             <ul>
               <li><code>merlin.jar</code>
               <li><code>avalon-framework.jar</code>
              <li><code>logkit.jar</code>
             </ul>
        <p>An example command line is shown below:</p>
         <pre>
       $ java -jar <strong>merlin.jar</strong> &lt;supporting-jar-files&gt; 
           -target &lt;class-name&gt; 
         </pre>
         <p><strong>java -classpath form</strong></p>
         <p>Execution using java -classpath pattern requires the inclusions 
         of the pipeline, framework and logkit jar files in the classpath 
         statement.</p>
         <p>An example command line is shown below:</p>
         <pre>
       $ java -classpath 
<strong>merlin.jar;avalon-framework.jar;logkit.jar</strong> 
           org.apache.avalon.excalibur.service.ServiceLoader
            &lt;supporting-jar-files&gt; -target &lt;class-name&gt; 
         </pre>
      <p><strong>Ant task</strong></p>
      <p>Execution of Merlin as an Ant task requires the presence 
      of the following files under the ${ant.home}/lib directory:</p>
             <ul>
               <li><code>merlin.jar</code>
               <li><code>avalon-framework.jar</code>
              <li><code>logkit.jar</code>
             </ul>
        <p>An example load task is included below:</p>
         <pre>
      &lt;task name="my-task"&gt;
  
        <font color="blue"><i>&lt;!--
        Declare the ant task. 
        --&gt;</i></font>
  
        &lt;taskdef resource="merlin.properties"/&gt;
  
        <font color="blue"><i>&lt;!--
        Invoke the loading of a target and supporting services. 
        --&gt;</i></font>
  
        &lt;load target="org.apache.demo.ReferralBlock" priority="DEBUG" 
          disposal="true" verbose="false"&gt;
  
          <font color="blue"><i>&lt;!--
          For all of the jar files in the fileset, load the jar file
          into the service classloader. 
           --&gt;</i></font>
  
          &lt;fileset dir="${dist}"&gt;
             &lt;include name="examples.jar"/&gt;
          &lt;/fileset&gt;
  
        &lt;/load&gt;
  
      &lt;/task"&gt;
         </pre>
  </td></tr>
  </table>
       
  
  <h3>Component Creation</h3>
  
  The pipeline class manages the creation and deployment of a target component 
and dynamic
  resolution of dependencies based on meta-information contained in a jar 
manifest file.  Entries
  in the manifest file reference class names that are used to load the 
component implementation
  and configuration the component based on meta-information contained in .xinfo 
and .conf files 
  of the same name as the implementation class.
  
  <h4>The Manifest File</h4>
  
  <p>Reusable components are published through a manifest declaration show 
below.  When 
  a jar file is supplied to the Pipeline the manifest is checked for any block 
declarations.
  Blocks declared within the manifest are registered by the pipeline as 
potentially available 
  services that can be used in service dependency resolution.  Each 
Avalon-block declaration
  in the manifest refers to a component implementation class and its associated 
.xinfo file.</p>
  
  <pre>
    Manifest-Version: 1.0
  
    Name: org/apache/DirectoryBlock.class
    Avalon-Block: true
  
    Name: org/apache/ReferralBlock.class
    Avalon-Block: true
  </pre>
  
  <h4>The &lt;classname&gt;.xinfo File</h4>
  
  <p>For each component declared in a manifest, the implementation establishes 
the available services
  and dependencies based on information contained in an <code>.xinfo</code> 
file.  Given a component
  implementation class 
<strong><code>org/apache/ReferralBlock.class</code></strong> the 
<code>ServiceLoader</code>  will attempt to locate a 
<strong><code>org/apache/ReferralBlock.xinfo</code></strong> 
  resource in the jar file.</P>
  
  <pre>
    &lt;?xml version="1.0"?&gt;
  
    &lt;blockinfo&gt;
  
        <font color="blue"><i>&lt;!--
        Block name and implementation version.
        --&gt;</i></font>
  
        &lt;block name="referral"&gt;
          &lt;version&gt;1.0&lt;/version&gt;
        &lt;/block&gt;
  
        <font color="blue"><i>&lt;!--
        Services that are offered by the component are declared under the 
        services element.  A services element may contain multiple service
        declarations.
        --&gt;</i></font>
  
        &lt;services&gt;
  
            <font color="blue"><i>&lt;!--
            A service declaration includes a class name (typically an interface)
            and a service version identifier.  Service versions may have up to 
            three fields (e.g. 1.1.3).
            --&gt;</i></font>
  
            &lt;service name="org.apache.ReferralService" version="1.0" /&gt;
  
        &lt;/services&gt;
  
        <font color="blue"><i>&lt;!--
        A component declares the dependencies it has with other components 
under 
        the dependencies element.  A dependencies element may contain multiple
        dependency statements.
        --&gt;</i></font>
  
        &lt;dependencies&gt;
  
            <font color="blue"><i>&lt;!--
            A dependency element contains the declaration of a role and a 
service
            that the component is dependent on. The pipeline processor will 
attempt
            to resolve dependencies based on registered services and 
dynamically 
            establish and provide the dependencies via the component 
Serviceable 
            implementation.  The role name corresponds to the identifying string
            that the component implementation will use to lookup a service from
            a service manager during the serviceable or composable lifecycle 
phase.
            --&gt;</i></font>
  
            &lt;dependency&gt;
  
                &lt;role&gt;directory&lt;/role&gt;
                &lt;service name="org.apache.DirectoryService" 
version="1.0"/&gt;
  
                <font color="blue"><i>&lt;!--
                An optional configuration element may be declared as part of a 
                dependency.  The configuration will be applied as the primary 
                configuration backaged by the supporting services default 
                configuration.
                --&gt;</i></font>
  
                &lt;configuration&gt;
                    &lt;policy value="COUNT"/&gt;
                &lt;/configuration&gt;
  
            &lt;/dependency&gt;
  
        &lt;/dependencies&gt;
  
        <font color="blue"><i>&lt;!--
        Component implementation policy may be one of the following:
        (a) <strong>SINGLETON</strong>, service is available for the lifetime 
of the manager
        (b) <strong>TRANSIENT</strong>, manager is a factory of transient 
service instances 
        (c) <strong>OTHER</strong>, (default) The container will check if the 
class implements 
        the org.apache.excalibur.mpool.Pool interface.  If true, 
<code>lookup</code> 
        and <code>release</code> invocations will be redirected to the pools 
<code>acquire</code> and 
        <code>release</code> methods - otherwise, the class will be registered 
under the 
        <strong>TRANSIENT</strong> policy.
        --&gt;</i></font>
      
        &lt;implementation policy="SINGLETON" /&gt;
  
        <font color="blue"><i>&lt;!--
        The default configuration for a component is declared under the 
<strong>configuration</strong>
        element.  This configuration value may be modified and/or supplimented 
by a 
        configuration supplied by a managing container.  If the 
<strong>configuration</strong>
        elements includes the <string>extends</string> attribute, the 
configuration will be created
        as a <code>CascadingConfiguration</code> where the default 
configuration is a resource derived
        from the extends path value and the primary configuration will be the 
content of the 
        configuration element.
        --&gt;</i></font>
  
        &lt;configuration extends=org/apache/"credits.xml"&gt;
           &lt;about&gt;Example default configuration for this 
component.&lt;/about&gt;
        &lt;/configuration&gt;
  
  
    &lt;/blockinfo&gt;
  </pre>
  <h4>Related Packages</h4>
  Related packages and services are available under the <a 
href="{$docRoot}/../../index.html" target="_top">Package Index.</a>
  </body>
  
  
  

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

Reply via email to