<?xml version="1.0" encoding="UTF-8"?>
<section version="5.0" xml:id="config.jonas_base_structure" xml:lang="en"
         xmlns="http://docbook.org/ns/docbook"
         xmlns:xlink="http://www.w3.org/1999/xlink"
         xmlns:xi="http://www.w3.org/2001/XInclude"
         xmlns:svg="http://www.w3.org/2000/svg"
         xmlns:mml="http://www.w3.org/1998/Math/MathML"
         xmlns:html="http://www.w3.org/1999/xhtml"
         xmlns:db="http://docbook.org/ns/docbook">
  <info>
    <title>JONAS_BASE structure</title>
  </info>

  <para>JONAS_BASE has the following structure:</para>

  <para><itemizedlist>
      <listitem>
        <para>the <filename class="directory">conf/</filename>
        directory</para>

        <para>contains <xi:include href="../variables.xml"
        xpointer="element(appserver)" /> configuration files.</para>
      </listitem>

      <listitem>
        <para>the <filename class="directory">deploy/</filename>
        directory</para>

        <para>is the main location used for deployment.</para>

        <para>At JOnAS startup time all the deployment plans, <xi:include
        href="../variables.xml" xpointer="j2ee" /> archives and OSGi bundles
        are deployed in the following order:</para>

        <para><orderedlist>
            <listitem>
              <para>Deployment plan repositories</para>
            </listitem>

            <listitem>
              <para>OSGi bundles</para>
            </listitem>

            <listitem>
              <para>RAR archives</para>
            </listitem>

            <listitem>
              <para>Deployment plan resources</para>
            </listitem>

            <listitem>
              <para>EJB archives</para>
            </listitem>

            <listitem>
              <para>WAR archives</para>
            </listitem>

            <listitem>
              <para>EAR archives</para>

              <para><note>
                  <para>For each category, file names are chosen in
                  alphabetical order</para>
                </note></para>
            </listitem>
          </orderedlist>Then this directory is periodically polled in order to
        deploy new archives. For more information have a look at the <link
        xlink:href="configuration_guide.html#services.depmonitor.config">depmonitor
        service configuration</link></para>
      </listitem>

      <listitem>
        <para>the <filename class="directory">lib/ </filename>directory
        <footnote>
            <para>see <link
            xlink:href="j2eeprogrammerguide.html#j2ee.pg.classloader">Understanding
            class loader hierarchy </link>for a complete description of the
            classloader mechanism.</para>
          </footnote></para>

        <para>Used for extending class loaders. It contains one sub
        directory:</para>

        <informaltable>
          <tgroup cols="2">
            <thead>
              <row>
                <entry>directory</entry>

                <entry>description</entry>
              </row>
            </thead>

            <tbody>
              <row>
                <entry align="center"><filename
                class="directory">ext</filename></entry>

                <entry align="center">For non-bundle extensions</entry>
              </row>
            </tbody>
          </tgroup>
        </informaltable>
      </listitem>

      <listitem>
        <para>the <filename class="directory">logs/</filename>
        directory</para>

        <para>where the log files are created at run-time</para>
      </listitem>

      <listitem>
        <para>the <filename class="directory">work/</filename>
        directory</para>

        <para>a working directory for <xi:include href="../variables.xml"
        xpointer="element(appserver)" /></para>

        <note>
          <para>This is the default name for the working directory. The
          working directory can be configured by editing the
          <filename>JONAS_BASE/conf/jonas.properties</filename> and by
          modifying the <property>jonas.workdirectory</property>
          property.</para>
        </note>
      </listitem>

      <listitem>
        <para>the <filename class="directory">repositories/</filename>
        directory</para>

        <para>this sub tree contains the following repositories used to store
        OSGi bundles and <xi:include href="../variables.xml"
        xpointer="j2ee" /> applications. Archives located in these
        repositories are priority in case they are also located in
        JONAS_ROOT/repositories</para>

        <itemizedlist>
          <listitem>
            <para><filename class="directory">maven2-internal/</filename> this
            directory is created during the building process of a JONAS_BASE
            environment. It may contain the JORAM resource adapter for JOnAS.
            It is used for internal purpose and should not be modified. This
            directory is structured as a Maven2 repository.</para>
          </listitem>

          <listitem>
            <para><filename
            class="directory">&lt;repository-id&gt;/</filename> contains
            archives downloaded through deployment plans from this
            repository.</para>
          </listitem>
        </itemizedlist>
      </listitem>
    </itemizedlist></para>
</section>
