<?xml version="1.0" encoding="UTF-8"?>
<chapter version="5.0" xml:id="commands.jms" 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">
  <title>JMS commands</title>

  <section>
    <title>JmsServer</title>

    <para>Launch the JORAM server with the existent configuration.</para>

    <section>
      <title>Synopsis</title>

      <cmdsynopsis>
        <command>JmsServer</command>
      </cmdsynopsis>
    </section>

    <section>
      <title>Description</title>

      <para>Launch the JORAM server with the existent configuration.</para>

      <para>The JORAM server configuration files are listed below:</para>

      <itemizedlist>
        <listitem>
          <para><filename>$JONAS_BASE/conf/a3servers.xml</filename></para>
        </listitem>

        <listitem>
          <para><filename>$JONAS_BASE/conf/joramAdmin.xml</filename></para>
        </listitem>

        <listitem>
          <para><filename>META-INF/ra.xml</filename> in the
          <filename>joram_ra_for_jonas.rar</filename> archive (may be in the
          internal repositories or in the <filename
          class="directory">deploy/</filename> directory).</para>
        </listitem>
      </itemizedlist>
    </section>

    <section>
      <title>Example</title>

      <para>The <emphasis>JmsServer</emphasis> command is typically run in the
      background:</para>

      <variablelist>
        <varlistentry>
          <term>JmsServer &amp;</term>

          <listitem>
            <para>on Unix</para>
          </listitem>
        </varlistentry>
      </variablelist>

      <variablelist>
        <varlistentry>
          <term>start JmsServer</term>

          <listitem>
            <para>on Windows</para>
          </listitem>
        </varlistentry>
      </variablelist>
    </section>
  </section>

  <section>
    <title>joram_raconfig</title>

    <para>Change the host and port parameters of a given JORAM server in the
    configuration files.</para>

    <section>
      <title>Options</title>

      <cmdsynopsis>
        <command>joram_raconfig</command>

        <arg>-p port</arg>

        <arg>-h host</arg>

        <arg>-s serverId</arg>
      </cmdsynopsis>

      <variablelist>
        <varlistentry>
          <term>-p port</term>

          <listitem>
            <para>Set the listening port of the JORAM server (defaults to
            16010).</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>-h host</term>

          <listitem>
            <para>Set the IP address of the JORAM server (defaults to
            localhost).</para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>-s serverId</term>

          <listitem>
            <para>Set the server id of the JORAM server (defaults to
            0).</para>
          </listitem>
        </varlistentry>
      </variablelist>
    </section>

    <section>
      <title>Description</title>

      <para>The joram_raconfig tool aims to facilitate consistent updates
      (accross multiple files) for the host and port parameters of a given
      JORAM server ID.</para>

      <para>JORAM relies on several configuration files:
      <filename>a3servers.xml,</filename> <filename>joramAdmin.xml</filename>
      and <filename>ra.xml.</filename> With joram_raconfig, these
      configuration files are updated all together and thus the consistency is
      ensured.</para>

      <para>Modified files:</para>

      <itemizedlist>
        <listitem>
          <para><filename>$JONAS_BASE/conf/a3servers.xml</filename></para>
        </listitem>

        <listitem>
          <para><filename>$JONAS_BASE/conf/joramAdmin.xml</filename></para>
        </listitem>

        <listitem>
          <para><filename>META-INF/ra.xml</filename> (in the JORAM resource
          adapter) is updated.</para>
        </listitem>
      </itemizedlist>

      <para>Resource adapters files are looked up in the following
      places:</para>

      <itemizedlist>
        <listitem>
          <para><filename>$JONAS_BASE/repositories/maven2-internal/org/objectweb/joram/joram_ra_for_jonas/{joram.version}/joram_ra_for_jonas-{joram.version}.rar</filename></para>
        </listitem>

        <listitem>
          <para><filename>$JONAS_BASE/deploy/joram_ra_for_jonas.rar</filename></para>
        </listitem>
      </itemizedlist>
    </section>

    <section>
      <title>Example</title>

      <para><screen><prompt>&gt;$ </prompt><command>joram_raconfig -h localhost -p 16012 -s 0
</command><computeroutput>Target JORAM Resource Adapter: /home/ ... /joram/joram_ra_for_jonas/5.2.1a/joram_ra_for_jonas-5.2.1a.rar
</computeroutput></screen></para>
    </section>
  </section>
</chapter>
