<?xml version="1.0" encoding="UTF-8"?>
<section version="5.0" xml:id="services.depmonitor.config" 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>depmonitor service configuration</title>
  </info>

  <para>The <emphasis role="bold">depmonitor</emphasis> service scans
  periodically some directories in the aim of deploying J2EE applications or
  OSGi bundles on a <xi:include href="../../variables.xml"
  xpointer="appserver" /> server. By default, you have to put the application
  files into the <filename>$JONAS_BASE/deploy</filename> directory in order to
  deploy them. It is possible to parse anothers directories by setting the
  directories property in the service configuration.</para>

  <para>The development attribute in the configuration allows to choose if the
  <emphasis role="bold">depmonitor</emphasis> service is in development mode
  or not :</para>

  <itemizedlist>
    <listitem>
      <para>The deployment monitor can be configured to detect at runtime if
      an application is added, removed or changed to respectively deploy it,
      undeploy it or redeploy it. This functionnality can be useful during the
      development phase.</para>
    </listitem>

    <listitem>
      <para>For a prodution usage of the <xi:include
      href="../../variables.xml" xpointer="appserver" /> server, this
      functionnality can be disabled so that the application files will be
      deployed only at startup. In this configuration, the <link
      xlink:href="command_guide.html#commands.jonas.jonasadmin">jonas admin
      command</link> or the jonasAdmin user interface will be used to perform
      deployment actions.</para>
    </listitem>
  </itemizedlist>

  <para>As the parsed directories may contain files that must not be deployed,
  a list of file exclusions can be defined.</para>

  <screen>###################### JOnAS Deployment Monitor
#
# Set the name of the implementation class of the depmonitor service
#
jonas.service.depmonitor.class          org.ow2.jonas.deployablemonitor.DeployableMonitorService

# Set the execution mode (three possible values):
# - inherit: inherit of the value of the "jonas.development" property 
# - true   : development mode
# - false  : production mode
jonas.service.depmonitor.development    inherit                                      <co
      xml:id="development" />

jonas.service.depmonitor.directories                                                 <co
      xml:id="directories" /> 
# List (comma separated) of exclusion patterns (based on names, not directories)          
jonas.service.depmonitor.exclusions     README                                       <co
      xml:id="exclusions" />

# Monitor interval in milliseconds
jonas.service.depmonitor.monitorInterval    5000                                     <co
      xml:id="monitorInterval" /></screen>

  <calloutlist>
    <callout arearefs="development">
      <para>If the property value is true, the directories are parsed
      periodically to detect file addition, modification or deletion. Else,
      the directories are parsed only at startup</para>
    </callout>

    <callout arearefs="directories">
      <para>A comma-separated list of directories which contain files to
      deploy</para>
    </callout>

    <callout arearefs="exclusions">
      <para>A comma-separated list of file names to exclude</para>
    </callout>

    <callout arearefs="monitorInterval">
      <para>Monitor interval in milliseconds between two scans</para>
    </callout>
  </calloutlist>
</section>
