The launch descriptor in detail

Recall the launch descriptor looks something like this:


<!DOCTYPE application PUBLIC "-//jtrix.org//TEXT application-0.1//EN"
    "http://www.jtrix.org/dtd/application-0.1.dtd">
<application>
    <jar jar_id='beatrix'>
        <url>file:/usr/lib/jtrix/beatrix.jar</url>
    </jar>
    <jar jar_id='skeleton2'>
        <url>file:/usr/lib/jtrix/skeleton2.jar</url>
    </jar>
    <jar jar_id='parser.jar'>
        <url>file:/usr/lib/jtrix/parser.jar</url>
    </jar>
    <jar jar_id='libjtrix'>
        <url>file:/usr/lib/jtrix/libjtrix.jar</url>
    </jar>
    <jar jar_id='facets1.jar'>
        <url>file:/usr/lib/jtrix/facets1.jar</url>
    </jar>
    <jar jar_id='jaxp.jar'>
        <url>file:/usr/lib/jtrix/jaxp.jar</url>
    </jar>
    <codebase codebase_id='ap'>
        <element jar_id='beatrix'/>
        <element jar_id='skeleton2'/>
        <element jar_id='libjtrix'/>
        <element jar_id='facets1.jar'/>
    </codebase>
    <codebase codebase_id='DEFAULT_FOR_ALL'>
        <element jar_id='skeleton2'/>
        <element jar_id='parser.jar'/>
        <element jar_id='jaxp.jar'/>
        <element jar_id='beatrix'/>
        <element jar_id='libjtrix'/>
        <element jar_id='facets1.jar'/>
    </codebase>
    <boot class='org.jtrix.project.beatrix.plugins.netlets.Manager'
          codebase_id='DEFAULT_FOR_ALL'/>
    <cmdline>
        <argument type="string" name="plugins" required="yes">
            org.jtrix.project.skeleton2.plugins.LifeCyclePlugin </argument>
        <argument type="x500dn" name="x500" required="yes">
            O=jtrix CN=skeleton2</argument>
        <argument type="string" name="name" required="yes">
            Initial Manager</argument>
    </cmdline>
    <config>
        <![CDATA[
            ....
        ]]>
    </config>
</application>

The XML elements are as follows:

jar
Describes part of the codebase. The jar_id gives it a handy label. This label is derived either from looking in the JAR's manifest (see Section [*]) or from its filename, so it may or may not end with .jar. Each JAR should have one or more URLs, each one being a possible location of where the JAR can be downloaded from.
codebase
Gathers a number of JARs together under one heading. Will be used to create and run a netlet. We have two codebases in this example: the default codebase which is used for managers and workers, and one called ap which we named specially for access points.
boot
Tells the launcher what codebase to use for the launched netlet and which class to use--this is the one that implements INetlet. As usual with Beatrix, this is the Manager netlet.
cmdline
Specifies how and what arguments are passed to the IPropertyCollection of the coldStart method. Each argument is a Property and its type must be a supported PropertyType. In our example both arguments' values are specified, but they need not be. Any required element which is not specified must therefore be given on the command line as part of the ``run'' command.
config
Arbitrary data passed into the application as a single lump. Beatrix sets this to be a BeatrixApplicationDescriptor object, but a non-Beatrix application can have whatever it likes there.
With the possible exception of the config element, we might want to write or edit one of these by hand.

Nik Silver 2002-03-09