<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  <!ENTITY % BOOK_ENTITIES SYSTEM "../../User_Guide.ent">
%BOOK_ENTITIES;
]>
<chapter id="java.install">
  <title id="java.install.title">Installing Server-Side Components</title>
  <para>
    First, extract the server-side binary to a temporary directory.
    The following assumes it was extracted to /tmp/mod_cluster
  </para>
  <para>
    Your next step depends on whether your target server is JBoss AS or JBossWeb/Tomcat.
  </para>

  <section>
    <title>Installing in JBoss AS 6.0.0.M1 and up</title>
    <para>
      You don't need to do anything to install the java-side binaries in AS 6.x;
      it's part of the AS distribution's default, standard and all configurations.
    </para>
  </section>

  <section>
    <title>Installing in JBoss AS 5.x</title>
    <para>
      Assuming $JBOSS_HOME indicates the root of your JBoss AS install and that you want to use mod_cluster in the AS's all config:
    </para>
    <programlisting>cp -r /tmp/mod_cluster/mod_cluster.sar $JBOSS_HOME/server/all/deploy</programlisting>
  </section>

  <section>
    <title>Installing in Tomcat</title>
    <para>
      Assuming $CATALINA_HOME indicates the root of your Tomcat install:
    </para>
    <programlisting>
    cp /tmp/mod_cluster/JBossWeb-Tomcat/lib/jboss-logging.jar $CATALINA_HOME/lib/
    cp /tmp/mod_cluster/JBossWeb-Tomcat/lib/mod_cluster-container-catalina* $CATALINA_HOME/lib/
    cp /tmp/mod_cluster/JBossWeb-Tomcat/lib/mod_cluster-container-spi* $CATALINA_HOME/lib/
    cp /tmp/mod_cluster/JBossWeb-Tomcat/lib/mod_cluster-core* $CATALINA_HOME/lib/
    </programlisting>
    and additionally for Tomcat6:
    <programlisting>cp /tmp/mod_cluster/JBossWeb-Tomcat/lib/mod_cluster-container-tomcat6* $CATALINA_HOME/lib </programlisting>
    and additionally for Tomcat7:
    <programlisting>cp /tmp/mod_cluster/JBossWeb-Tomcat/lib/mod_cluster-container-tomcat7* $CATALINA_HOME/lib </programlisting>
  </section>
</chapter>
