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

  <para>The <emphasis role="bold">ejb3</emphasis> service provides EJB 3
  container support. This service is provided by the <xi:include
  href="../../variables.xml" xpointer="EasyBeans" /> container.</para>

  <para>The declaration of the ejb3 service is done in the
  <filename>jonas.properties</filename> file.</para>

  <para><screen>###################### JOnAS EJB 3 container service configuration
#
#  Set the name of the implementation class of the EJB 3 service.
jonas.service.ejb3.class    org.ow2.jonas.ejb.easybeans.EasyBeansService

#  List (comma separated) of JPA providers: hibernate,eclipselink
jonas.service.ejb3.jpa.providers hibernate

</screen></para>

  <para>The <varname>jonas.service.ejb3.jpa.providers</varname> property
  allows to define a list of JPA providers that could be used by <xi:include
  href="../../variables.xml" xpointer="EasyBeans" />. For the moment,
  <xi:include href="../../variables.xml" xpointer="Hibernate" /> and
  <xi:include href="../../variables.xml" xpointer="EclipseLink" /> JPA
  providers are available.</para>

  <para><xi:include href="../../variables.xml" xpointer="EasyBeans" /> has its
  own configuration file that is located in <filename
  class="directory">JONAS_BASE/conf</filename> folder. The name of the
  configuration file is <filename>easybeans-jonas.xml</filename>.</para>

  <para>By default, <xi:include href="../../variables.xml"
  xpointer="EasyBeans" /> is using only services provided by <xi:include
  href="../../variables.xml" xpointer="appserver" />. Thus, no additional
  components are required for starting <xi:include href="../../variables.xml"
  xpointer="EasyBeans" />.</para>

  <para><programlisting>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;easybeans xmlns="http://org.ow2.easybeans.server"&gt;

    &lt;!-- No infinite loop (managed by JOnAS): wait="false"
         Enable MBeans: mbeans="true"
         Disable the naming: naming="false"
         Use JOnAS JACC provider: jacc="false"
         Using JOnAS monitoring: scanning="false"
         Using JOnAS JMX Connector: connector="false"
         Disable Deployer and J2EEServer MBeans: deployer="false" &amp; j2eeserver="false"
    --&gt;
    &lt;config
        wait="false"
        mbeans="true"
        naming="false"
        jacc="false"
        scanning="false"
        connector="false"
        deployer="false"
        j2eeserver="false" /&gt;

    &lt;!-- Define components that will be started at runtime --&gt;
    &lt;components&gt;
        &lt;!-- All components are launched by JOnAS --&gt;

        &lt;!-- RMI component will be used to access some of JNDI properties --&gt;
        &lt;!-- But as there are no protocols, no registry is launched. --&gt;
        &lt;rmi /&gt;

        &lt;!-- Start smartclient server with a link to the rmi component--&gt;
        &lt;!--smart-server port="2503" rmi="#rmi" /--&gt;
    &lt;/components&gt;
&lt;/easybeans&gt;
</programlisting></para>

  <para>The <varname>&lt;config&gt;</varname> element describes <xi:include
  href="../../variables.xml" xpointer="EasyBeans" /> configuration properties
  that may be different for each application server. The settings provided in
  this file are the <xi:include href="../../variables.xml"
  xpointer="appserver" /> settings and they shouldn't be modified in almost
  any cases.</para>

  <para>The <varname>&lt;component&gt;</varname> element defines the
  <xi:include href="../../variables.xml" xpointer="EasyBeans" /> components
  that will be started at the startup. Here <xi:include
  href="../../variables.xml" xpointer="EasyBeans" /> is integrated in
  <xi:include href="../../variables.xml" xpointer="appserver" />, it will thus
  use JOnAS services like transaction, security, naming, registry.</para>

  <para>The smart client component provides a mechanism for downloading
  classes missing on the client side, from the server side. This allows to
  have a very small library on the client side and it downloads classes on
  demand. When this component is enabled, the listening port can be
  configured. More documentation on the Smart component can be found in
  EasyBeans documentation.</para>
</section>
