<?xml version="1.0" encoding="UTF-8"?>
<section version="5.0" 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>FAQ</title>
  </info>

  <section>
    <info>
      <title>EJB clustering related questions</title>
    </info>

    <section>
      <info>
        <title>Does CMIv2 work with JOnAS 4 ?</title>
      </info>

      <para>No, CMIv2 relies on Carol V3.x and is not compliant with JOnAS 4.
      By the way CMIv2 requires JDK5 and higher.</para>
    </section>

    <section>
      <info>
        <title>Does EJB clustering with CMI require a change in the client
        application ?</title>
      </info>

      <para>No, new CMI (v2) is completely transparent for the client and
      doesn't require a pre-compilation step which is different from CMI v1 in
      JOnAS 4.</para>
    </section>

    <section>
      <info>
        <title>Does EJB clustering with CMI require a change in the server
        application ?</title>
      </info>

      <para>EJB application doesn't require any change provided that the
      application design is clustering safe. Typically static field must not
      be used. If no clustering annotation are set into the POJO, the specific
      deployment descriptor can be added for describing the load-balancing
      logic.</para>
    </section>
  </section>

  <section xml:id="faq.jgroups">
    <info>
      <title>JGroups related questions</title>
    </info>

    <section>
      <info>
        <title>About the network interface</title>
      </info>

      <para>To select the right network interface, set your IP with the
      attribute bind_addr of the element UDP into the JGroups configuration
      files:</para>

      <para><screen>
&lt;config&gt;
    &lt;UDP bind_addr="192.168.0.1"
    ...
    /&gt;
...
&lt;/config&gt;

</screen></para>
    </section>

    <section>
      <info>
        <title>About JGroups 2.2.9.x &amp; IPv6</title>
      </info>

      <para>JGroups 2.2 doesn't support IPv6. It must be disabled in the JVM
      by setting the <literal>java.net.preferIPv4Stack</literal> to
      <literal>true</literal>. JGroups 2.2 is used both in the
      <envar>cmi</envar> and <envar>discovery</envar> services in JOnAS 4.
      JOnAS 5 embeds JGroups 2.6 that supports quite well IPv6.</para>

      <para>In JOnAS 4, when IPv6 is not disabled, the following exceptions
      may appear: <screen>
...
TP.down : failed sending message with java.io.IOException: Invalid argument
...
org.jgroups.ChannelException: failed to start protocol stack
        </screen></para>

      <para>Parameter setting example with linux/unix system:</para>

      <screen>
export JAVA_OPTS="$JAVA_OPTS -Djava.net.preferIPv4Stack=true"
      </screen>
    </section>

    <section>
      <info>
        <title>About JGroups 2.2.9.x &amp; JDK6</title>
      </info>

      <para>JGroups 2.2 doesn't support JDK6. The problem is due to the JDK
      and is documented by Sun <link
      xlink:href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6434149">
      here. </link> JGroups is used both in the <envar>cmi</envar> and
      <envar>discovery</envar> services in JOnAS 4.</para>

      <para>In a configuration JOnAS 4/Jdk6, the following exceptions may
      appear: <screen>
...
org.jgroups.ChannelException: failed loading class
...
        </screen></para>

      <para>The workaround consists in setting the
      <literal>sun.lang.ClassLoader.allowArraySyntax</literal> jvm property to
      <literal>true</literal>. Example of such setting in a linux
      system:</para>

      <screen>
export JAVA_OPTS="$JAVA_OPTS -Dsun.lang.ClassLoader.allowArraySyntax=true"
      </screen>
    </section>
  </section>

  <section>
    <info>
      <title>Management related questions</title>
    </info>

    <section>
      <info>
        <title>Does JOnAS provide a way to start remotely an instance.</title>
      </info>

      <para>Yes, JOnAS provides a cluster daemon which acts as a JOnAS
      instances bootstrap. The cluster daemon exposes a JMX remote interface
      enabling the remote control.</para>
    </section>
  </section>
</section>
