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

  <para>The <emphasis role="bold">resource</emphasis> service must be started
  when <xi:include href="../../variables.xml" xpointer="j2ee"/> components
  require access to an external Enterprise Information Systems. The standard
  way to do this is to use a third party software component called <emphasis role="bold">Resource Adapter</emphasis>.</para>

  <para>The role of the Resource service is to deploy the Resource Adapters in
  the <xi:include href="../../variables.xml" xpointer="element(appserver)"/>
  server, i.e., configure it in the operational environment and register in
  JNDI name space a connection factory instance that can be looked up by the
  application components. The <emphasis role="bold">resource</emphasis>
  service implements the <xi:include href="../../variables.xml" xpointer="element(j2ee)"/>
  Connector Architecture 1.5<footnote>
      <para>There is no real acronym for this specification JCA was the
      acronym for Java Cryptography Architecture . In the rest of this
      document we will use J2CA</para>
    </footnote>.</para>

  <para><emphasis role="bold">Resource Adapter</emphasis> are packaged in
  Java EE rar archives.</para>

  <para>In development mode, as all other <xi:include href="../../variables.xml" xpointer="j2ee"/>
  archives rar archives can be deployed automatically as soon as they are
  copied under $JONAS_BASE/deploy and undeployed as soon as they has been
  removed from this location. </para>

  <para>For more information see <xref linkend="services.depmonitor.config"/>.</para>

  <para>The other ways to deploy rar archives is </para>

  <itemizedlist>
    <listitem>
      <para>to use the jonasAdmin console.</para>
    </listitem>

    <listitem>
      <para>to use the command jonas admin:</para>

      <screen>jonas admin -a   &lt;mydir&gt;/myrar.rar</screen>
    </listitem>
  </itemizedlist>

  <para>A JOnAS specific resource adapter configuration xml file must be
  included in each resource adapter. This file replicates the values of all
  configuration properties declared in the deployment descriptor for the
  resource adapter. Refer to Defining the JOnAS Connector Deployment
  Descriptor in <link xlink:href="connector_pg.html">J2EE
  Connector Programmer's Guide</link> for additional information.</para>

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

  <screen>###################### JOnAS J2CA resource service configuration
#
#  Set the name of the implementation class of the J2CA resource service
jonas.service.resource.class org.ow2.jonas.resource.internal.JOnASResourceService</screen>

  <para>The worker thread pool used for all J2CA 1.5 Resource Adapters
  deployed can be configured in the <xref linkend="services.wm.config"/>
  service.</para>

  <para><emphasis role="bold">resource</emphasis> service is mainly used in
  JOnAS for accessing databases via a JDBC resource adapter (in this case it
  replace <emphasis role="bold">dbm</emphasis> service) and for providing JMS
  facilities.</para>

  <para>JOnAS provides several JDBC resource adapters and a JMS resource
  adapter on top of <link xlink:href="http://joram.objectweb.org/">JORAM</link>
  More information about configuring resource adapters can be found in <xref linkend="config.ra"/></para>
</section>