Resource Directive

Description

A resource directive is a logical reference to a jar file within the enclosing repository. A repository implementation is responsible for the mapping of logical directives to physical jar URL.

Attributes

Attribute Required Description
id yes A resource artifact identifier in form [group]:[artifact-name]. The value identifes a jar file containing a block defintition that is resolved relative to a repository established by the Merlin Kernel.
version no Used in conjuction with the id attribute to qualify the artifact version.
type no Default to 'jar'. Used to declare the type of resource.

Sample XML

The following example block.xml demonstrates the inclusion of three blocks within another enclosing block. In this example, the common shared API (containing service interfaces classes is declared in the containing block classloader).

<container name="test">

     <classloader>
       <classpath>
         <repository>
           <resource id="james:mail" version="1.3"/>
           <resource id="james:activation" version="1.0"/>
           <resource id="james:mailet-api" version="1.0"/>
         </repository>
       </classpath>
     </classloader>

    <!-- include blocks here -->

    <include name="james" id="james:block" type="xml"/>

</container>