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

  <para>The <emphasis role="bold">ear</emphasis> service allows deployment of
  complete <xi:include href="../../variables.xml" xpointer="j2ee" />
  applications (including <filename class="extension">ejb-jar</filename>,
  <filename class="extension">war </filename>and rar files packed in an
  <filename class="extension">ear </filename>file). This service is based on
  the <emphasis role="bold">web</emphasis> service for deploying the included
  <filename class="extension">wars</filename>, the <emphasis
  role="bold">ejb2</emphasis> or <emphasis role="bold">ejb3</emphasis> service
  for deploying the EJB containers for the included <filename
  class="extension">ejb-jars</filename> and the <emphasis
  role="bold">resource</emphasis> service for deploying the included <filename
  class="extension">rars</filename>.</para>

  <para>In development mode, as all other <xi:include
  href="../../variables.xml" xpointer="j2ee" /> archives ear archives can be
  deployed automatically as soon as they are copied under
  <filename>$JONAS_BASE/deploy</filename> (or under another
  configuration-defined directory) and undeployed as soon as they has been
  removed from this location.</para>

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

  <screen>###################### JOnAS EAR service configuration
#
#  Set the name of the implementation class of the ear service.
jonas.service.ear.class    org.ow2.jonas.ear.internal.JOnASEARService

#  Set the XML deployment descriptors parsing mode for the EAR service
#  (with or without validation).
jonas.service.ear.parsingwithvalidation    true             <co
      xml:id="parsingwithvalidation" />

# Generate stubs for all EJBs that may be accessed from the application
# In almost all cases, this is not required to be enabled as stubs can be found.
jonas.service.ear.genstub    true

# Create a child classloader when deploying EJB3 of the EAR
jonas.service.ear.useEJB3ChildClassloader    true</screen>

  <calloutlist>
    <callout arearefs="parsingwithvalidation">
      <para>Set or not the XML validation at the deployment descriptor parsing
      time</para>
    </callout>
  </calloutlist>
</section>