<?xml version="1.0" encoding="UTF-8"?>
<book version="5.0" 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 5 Configuration guide</title>

    <authorgroup>
      <author>
        <orgname>JOnAS Team</orgname>
      </author>
    </authorgroup>

    <legalnotice>
      <para>This work is licensed under the Creative Commons
      Attribution-ShareAlike License. To view a copy of this license,visit
      <link
      xlink:href="http://creativecommons.org/licenses/by-sa/2.0/deed.en">http://creativecommons.org/licenses/by-sa/2.0/deed.en</link>
      or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford,
      California 94305, USA.</para>
    </legalnotice>

    <copyright>
      <year>2007-2011</year>

      <holder>OW2 Consortium</holder>
    </copyright>

    <date>April 2011</date>
  </info>

  <chapter>
    <info>
      <title>Introduction</title>
    </info>

    <section>
      <info>
        <title>Configuring JOnAS</title>
      </info>

      <para>Configuration is a task that may be more or less complex.
      Configuring a unique instance is obviously easier than configuring a
      cluster of servers.</para>

      <para>Configuration task consists mainly in customizing a set of
      <xi:include href="variables.xml" xpointer="appserver" /> configuration
      files that compose the <xi:include href="variables.xml"
      xpointer="appserver" /> environment see <xref
      linkend="config.env" />.</para>

      <para>First of all, some terms used is this document must be
      defined:</para>
    </section>

    <xi:include href="terminology.xml" />
  </chapter>

  <chapter>
    <info>
      <title>Configuring a JOnAS instance</title>
    </info>

    <para><xi:include href="variables.xml" xpointer="appserver" /> is
    pre-configured and ready to be used directly. The <link
    xlink:href="GettingStarted.html#GettingStarted">Getting Started
    book</link> has shown that a very sample example may be run after JOnAS
    installation without any configuration task. But as soon as your
    application needs to use resources specific to the execution environment,
    configuration is mandatory.</para>

    <para>In this chapter we will see in a first part where are the
    configuration files and then what that can be configured</para>

    <section xml:id="config.env">
      <info>
        <title>Configuring JOnAS Environment</title>
      </info>

      <para>JOnAS distribution contains a number of configuration files in
      <filename class="directory">$JONAS_ROOT/conf</filename> directory. These
      files can be edited to change the default configuration. However, it is
      recommended that the configuration files needed by a specific
      application running on <xi:include href="variables.xml"
      xpointer="appserver" /> be placed in a separate location. This is done
      by using an additional environment variable called JONAS_BASE.</para>

      <para>JOnAS configuration files are read from the $JONAS_BASE/conf
      directory. If JONAS_BASE is not defined, it is automatically initialized
      to $JONAS_ROOT.</para>

      <xi:include href="config/jonasroot_structure.xml" />

      <xi:include href="config/jonasbase_structure.xml" />

      <xi:include href="config/jonasbase_creation.xml" />

      <xi:include href="config/jonasbase_conf.xml" />

      <xi:include href="config/jonas_properties.xml" />
    </section>

    <xi:include href="protocols/config.xml" />

    <xi:include href="log/config.xml" />

    <section xml:id="config.services">
      <info>
        <title>Configuring JOnAS Services</title>
      </info>

      <para>Here is the list of possible services</para>

      <screen xml:id="config.jonas_properties.allservices">registry,jmx,security,jtm,db,mail,wc,dbm,wm,resource,cmi,ha,versioning,ejb2,ejb3,jaxrpc,jaxws,web,ear,depmonitor,discovery,resourcemonitor,smartclient,wsdl-publisher</screen>

      <para>In this chapter we will describe how to configure each service in
      the <filename>jonas.properties</filename> file.</para>

      <xi:include href="services/cmi/config.xml" />

      <xi:include href="services/db/config.xml" />

      <xi:include href="services/depmonitor/config.xml" />

      <xi:include href="services/dbm/config.xml" />

      <xi:include href="services/discovery/config.xml" />

      <xi:include href="services/ear/config.xml" />

      <xi:include href="services/ejb2/config.xml" />

      <xi:include href="services/ejb3/config.xml" />

      <xi:include href="services/ha/config.xml" />

      <xi:include href="services/jaxrpc/config.xml" />

      <xi:include href="services/jaxws/config.xml" xpointer="element(/1)" />

      <xi:include href="services/jmx/config.xml" />

      <xi:include href="services/jtm/config.xml" />

      <xi:include href="services/mail/config.xml" />

      <xi:include href="services/registry/config.xml" />

      <xi:include href="services/resource/config.xml" />

      <xi:include href="services/security/config.xml" />

      <xi:include href="services/smartclient/config.xml" />

      <xi:include href="services/versioning/config.xml" />

      <xi:include href="services/wc/config.xml" />

      <xi:include href="services/web/config.xml" />

      <xi:include href="services/wm/config.xml" />

      <xi:include href="services/wsdl-publisher/config.xml"
                  xpointer="element(/1)" />
    </section>

    <xi:include href="security/configsecurity.xml" />

    <xi:include href="ra/JDBCRA.xml" />

    <xi:include href="ra/JDBCXML.xml" />

    <xi:include href="ra/JMSRA.xml" />

    <xi:include href="services/dbm/jdbcdatasource.xml" />
  </chapter>

  <xi:include href="easybeans/configuration_file.xml" />

  <chapter>
    <info>
      <title>Glossary</title>
    </info>

    <xi:include href="Glossary.xml" />
  </chapter>
</book>
