<commit_before><?xml version="1.0" encoding="UTF-8"?>
<chapter id="deployment">
   <title>Deployment</title>

   <para>The IronJacamar distribution contains a deploy/ directory where all deployments
     should be deployed to.</para>

   <section id="packagingrequirements">
      <title>Packaging requirements</title>

      <para>A resource adapter archive is a structured Java Archive (JAR) file, which 
        bundles all Java classes in JAR files, and optionally contains metadata, resources and native
        libraries.</para>

      <para>An example of a resource adapter archive could look like</para>

      <programlisting>
<![CDATA[
[jpederse@localhost]$ jar tf ra.rar
META-INF/ra.xml
readme.html
ra.jar
images/icon.jpg
win.dll
linux.so
 ]]>
      </programlisting>

      <para>See the Java EE Connector Architecture 1.6 specification chapter 20 for further
        requirements.</para>

   </section>

   <section id="deployingrar">
      <title>Deploying resource adapters</title>

      <para>Resource adapters (.rar) are deployed by copying the resource adapter into the 
        <code>deploy/</code> directory</para>

     <programlisting>
cp example.rar ironjacamar-1.0.0/deploy
     </programlisting>

     <para>on a Un*x based system or</para>

     <programlisting>
copy example.rar ironjacamar-1.0.0\deploy
     </programlisting>

     <para>on Windows.</para>

     <para>The Java Naming and Directory Interface (JNDI) name of each connection factory or
       admin ojbect is controlled through the <code>JndiStrategy</code> property on the
       <code>RADeployer</code>. If the <code>SimpleJndiStrategy</code> class is used the
       connection factory is bound under</para>

     <programlisting>
java:/eis/&lt;deploymentName&gt;
     </programlisting>

     <para>- f.ex. <code>java:/eis/example</code>.</para>

   </section>

   <section id="deployingds">
      <title>Deploying datasources</title><commit_msg>Provide a simple example of the -ra.xml format<commit_after><?xml version="1.0" encoding="UTF-8"?>
<chapter id="deployment">
   <title>Deployment</title>

   <para>The IronJacamar distribution contains a deploy/ directory where all deployments
     should be deployed to.</para>

   <section id="packagingrequirements">
      <title>Packaging requirements</title>

      <para>A resource adapter archive is a structured Java Archive (JAR) file, which 
        bundles all Java classes in JAR files, and optionally contains metadata, resources and native
        libraries.</para>

      <para>An example of a resource adapter archive could look like</para>

      <programlisting>
<![CDATA[
[jpederse@localhost]$ jar tf ra.rar
META-INF/ra.xml
readme.html
ra.jar
images/icon.jpg
win.dll
linux.so
 ]]>
      </programlisting>

      <para>See the Java EE Connector Architecture 1.6 specification chapter 20 for further
        requirements.</para>

   </section>

   <section id="deployingrar">
      <title>Deploying resource adapters</title>

      <para>Resource adapters (.rar) are deployed by copying the resource adapter into the 
        <code>deploy/</code> directory</para>

     <programlisting>
cp example.rar ironjacamar-1.0.0/deploy
     </programlisting>

     <para>on a Un*x based system or</para>

     <programlisting>
copy example.rar ironjacamar-1.0.0\deploy
     </programlisting>

     <para>on Windows.</para>

     <para>The resource adapter can be configured and activated through deployment of a <code>-ra.xml</code>
       file in the <code>deploy/</code> directory - f.ex. <code>deploy/example-ra.xml</code>. The format of the XML 
       document is defined by the <code>resource-adapters_1_0.xsd</code> - f.ex</para>

     <programlisting>
<![CDATA[
<resource-adapters>
  <resource-adapter>
    <archive>example.rar</archive>
    <connection-definitions>
      <connection-definition jndi-name="java:/eis/example" class="com.example.ra.MCF"/>
    </connection-definitions>
  </resource-adapter>
</resource-adapters>
]]>
     </programlisting>

     <para>to bind the connection factory from <code>com.example.ra.MCF</code> under <code>java:/eis/example</code>.</para>

     <para>See the schema appendix for additional details about the format.</para>

     <para>Alternative the resource adapter deployments will be picked up by the <code>RAActivator</code>
       bean which bind a single connection factory under</para>

     <programlisting>
java:/eis/&lt;deploymentName&gt;
     </programlisting>

     <para>- f.ex. <code>java:/eis/example</code>.</para>

   </section>

   <section id="deployingds">
      <title>Deploying datasources</title>
{'fraction_non_alphanumeric': 0.11731601731601732, 'fraction_numerical': 0.006060606060606061, 'mean_word_length': 3.4518304431599227, 'pattern_counts': {'":': 0, '<': 133, '<?xml version=': 2, '>': 133, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 7}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4895030', 'n_tokens_mistral': 1474, 'n_tokens_neox': 1339, 'n_words': 398}