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

  <para>The <emphasis role="bold">wm</emphasis> service provides a <link
  xlink:href="http://java.sun.com/j2ee/1.4/docs/api/javax/resource/spi/work/WorkManager.html">J2CA
  WorkManager</link> implementation. This service don't need to be defined in
  the list of JOnAS services as it is automatically started when
  required.</para>

  <para>Here is the part of <filename>jonas.properties</filename> concerning
  the <emphasis role="bold">wm</emphasis> service:</para>

  <para xml:id="screen_wm_service"><screen>###################### JOnAS WorkManager service configuration
#
#  Set the name of the implementation class of the wm service
jonas.service.wm.class    org.ow2.jonas.workmanager.internal.JOnASWorkManagerService

#  Set the size of the worker thread pool
jonas.service.wm.minworkthreads   3                               <co
        xml:id="min" />

#  Set the maximun size of the worker thread pool
jonas.service.wm.maxworkthreads   80                              <co
        xml:id="max" />

#  Set the max # of seconds that a thread will wait for work
#  This is used to shrink the worker thread pool back to minimum
jonas.service.wm.threadwaittimeout 60                             <co
        xml:id="timeout" />
</screen><calloutlist>
      <callout arearefs="min">
        <para>Defines the minimum size of the Thread pool</para>
      </callout>

      <callout arearefs="max">
        <para>Defines the maximum size of the Thread pool</para>
      </callout>

      <callout arearefs="timeout">
        <para>Defines the maximum time (in seconds) that a worker Thread
        should wait before execution</para>
      </callout>
    </calloutlist></para>

  <para>The <emphasis role="bold">wm</emphasis> service is used, for example,
  in the <emphasis role="bold">resource</emphasis> service (J2CA 1.5
  implementation) in order to provide a
  <classname>javax.resource.spi.work.WorkManager</classname> instance for
  deployed resource adapters (like <literal>JMS</literal>, ...).</para>
</section>
