[jboss-cvs] jboss-docs/jbossas/j2ee/en ...

Norman Richards norman.richards at jboss.com
Wed Nov 1 13:14:13 EST 2006


  User: nrichards
  Date: 06/11/01 13:14:13

  Modified:    jbossas/j2ee/en  master.xml
  Log:
  modified for j2ee guide
  
  Revision  Changes    Path
  1.2       +296 -358  jboss-docs/jbossas/j2ee/en/master.xml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: master.xml
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-docs/jbossas/j2ee/en/master.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- master.xml	18 Sep 2006 16:48:19 -0000	1.1
  +++ master.xml	1 Nov 2006 18:14:13 -0000	1.2
  @@ -385,7 +385,7 @@
   String url = (String) array.get(0);
   
   java.lang.ClassCastException: java.net.URL
  -at org.jboss.chap2.ex0.ExCCEa.main(Ex1CCE.java:16)</programlisting>
  +at org.jboss.book.jmx.ex0.ExCCEa.main(Ex1CCE.java:16)</programlisting>
                       <para>The <literal>ClassCastException</literal> tells you that the attempt to cast the array element
                           to a <literal>String</literal> failed because the actual type was <literal>URL</literal>. This
                           trivial case is not what we are interested in however. Consider the case of a JAR being loaded
  @@ -394,7 +394,7 @@
                           An example of this is illustrated by the code shown in <xref linkend="ch2.duploader.ex"/>.</para>
                       <example id="ch2.duploader.ex">
                           <title>The ExCCEc class used to demonstrate ClassCastException due to duplicate class loaders</title>
  -                        <programlisting>package org.jboss.chap2.ex0;
  +                        <programlisting>package org.jboss.book.jmx.ex0;
   
   import java.io.File;
   import java.net.URL;
  @@ -411,7 +411,7 @@
    * results from classes loaded through
    * different class loaders.
    * @author Scott.Stark at jboss.org
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */
   public class ExCCEc
   {
  @@ -426,7 +426,7 @@
           URL[] cp0 = {jar0.toURL()};
           URLClassLoader ucl0 = new URLClassLoader(cp0);
           Thread.currentThread().setContextClassLoader(ucl0);
  -        Class objClass = ucl0.loadClass("org.jboss.chap2.ex0.ExObj");
  +        Class objClass = ucl0.loadClass("org.jboss.book.jmx.ex0.ExObj");
           StringBuffer buffer = new
               StringBuffer("ExObj Info");
           Debug.displayClassInfo(objClass, buffer, false);
  @@ -439,7 +439,7 @@
           URL[] cp1 = {jar1.toURL()};
           URLClassLoader ucl1 = new URLClassLoader(cp1);
           Thread.currentThread().setContextClassLoader(ucl1);
  -        Class ctxClass2 = ucl1.loadClass("org.jboss.chap2.ex0.ExCtx");
  +        Class ctxClass2 = ucl1.loadClass("org.jboss.book.jmx.ex0.ExCtx");
           buffer.setLength(0);
           buffer.append("ExCtx Info");
           Debug.displayClassInfo(ctxClass2, buffer, false);
  @@ -461,7 +461,7 @@
                       </example>
                       <example id="ch2.threeclasses.ex">
                           <title>The ExCtx, ExObj, and ExObj2 classes used by the examples</title>
  -                        <programlisting>package org.jboss.chap2.ex0;
  +                        <programlisting>package org.jboss.book.jmx.ex0;
   
   import java.io.IOException;
   import org.apache.log4j.Logger;
  @@ -471,7 +471,7 @@
    * A classes used to demonstrate various class
    * loading issues
    * @author Scott.Stark at jboss.org
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */
   public class ExCtx
   {
  @@ -519,26 +519,26 @@
           log.info("In pkgUseValue");
       }
   }</programlisting>
  -                        <programlisting>package org.jboss.chap2.ex0;
  +                        <programlisting>package org.jboss.book.jmx.ex0;
   
   import java.io.Serializable;
   
   /**
    * @author Scott.Stark at jboss.org
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */
   public class ExObj
       implements Serializable
   {
       public ExObj2 ivar = new ExObj2();
   }</programlisting>
  -                        <programlisting>package org.jboss.chap2.ex0;
  +                        <programlisting>package org.jboss.book.jmx.ex0;
   
   import java.io.Serializable;
   
   /**
    * @author Scott.Stark at jboss.org
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */
   public class ExObj2 
       implements Serializable
  @@ -548,75 +548,69 @@
                       <para>The <literal>ExCCEc.main</literal> method uses reflection to isolate the classes that are
                           being loaded by the class loaders <literal>ucl0</literal> and <literal>ucl1</literal> from the
                           application class loader. Both are setup to load classes from the
  -                        <literal>output/chap2/j0.jar</literal>, the contents of which are:</para>
  -                    <programlisting>[examples]$ jar -tf output/chap2/j0.jar
  +                        <literal>output/jmx/j0.jar</literal>, the contents of which are:</para>
  +                    <programlisting>[examples]$ jar -tf output/jmx/j0.jar
   ...
  -org/jboss/chap2/ex0/ExCtx.class
  -org/jboss/chap2/ex0/ExObj.class
  -org/jboss/chap2/ex0/ExObj2.class
  +org/jboss/book/jmx/ex0/ExCtx.class
  +org/jboss/book/jmx/ex0/ExObj.class
  +org/jboss/book/jmx/ex0/ExObj2.class
   </programlisting>
                       <para>We will run an example that demonstrates how a class cast exception can occur and then look at
                           the specific issue with the example. See <xref linkend="appendix-install"/> for instructions on
                           installing the examples accompanying the book, and then run the example from within the examples
                           directory using the following command:</para>
  -                    <programlisting>[examples]$ ant -Dchap=chap2 -Dex=0c run-example
  +                    <programlisting>[examples]$ ant -Dchap=jmx -Dex=0c run-example
   ...
  -     [java] [ERROR,UCL1] Failed to invoke ExCtx.useValue
        [java] java.lang.reflect.InvocationTargetException
        [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
  -.java:25)
  -     [java] at java.lang.reflect.Method.invoke(Method.java:324)
  -     [java] at org.jboss.chap2.ex0.ExCCEc.main(ExCCEc.java:58)
  -     [java] Caused by: java.lang.ClassCastException
  -     [java] at org.jboss.chap2.ex0.ExCtx.useValue(ExCtx.java:44)
  +                .java:25)
  +     [java]     at java.lang.reflect.Method.invoke(Method.java:585)
  +     [java]     at org.jboss.book.jmx.ex0.ExCCEc.main(ExCCEc.java:58)
  +     [java] Caused by: java.lang.ClassCastException: org.jboss.book.jmx.ex0.ExObj
  +     [java]     at org.jboss.book.jmx.ex0.ExCtx.useValue(ExCtx.java:44)
        [java] ... 5 more</programlisting>
                       <para>Only the exception is shown here. The full output can be found in the
  -                            <literal>logs/chap2-ex0c.log</literal> file. At line 55 of <literal>ExCCEc.java</literal> we
  +                            <literal>logs/jmx-ex0c.log</literal> file. At line 55 of <literal>ExCCEc.java</literal> we
                           are invoking <literal>ExcCCECtx.useValue(Object)</literal> on the instance loaded and created in
                           lines 37-48 using <literal>ucl1</literal>. The <literal>ExObj</literal> passed in is the one
                           loaded and created in lines 25-35 via <literal>ucl0</literal>. The exception results when the
                               <literal>ExCtx.useValue</literal> code attempts to cast the argument passed in to a
                               <literal>ExObj</literal>. To understand why this fails consider the debugging output from
  -                        the <literal>chap2-ex0c.log</literal> file shown in <xref linkend="ch2.debug.ex"/>.</para>
  +                        the <literal>jmx-ex0c.log</literal> file shown in <xref linkend="ch2.debug.ex"/>.</para>
                       <example id="ch2.debug.ex">
  -                        <title>The chap2-ex0c.log debugging output for the ExObj classes seen</title>
  +                        <title>The jmx-ex0c.log debugging output for the ExObj classes seen</title>
                           <programlisting>[INFO,UCL0] ExObj Info
  -org.jboss.chap2.ex0.ExObj(113fe2).ClassLoader=java.net.URLClassLoader at 6e3914
  -..java.net.URLClassLoader at 6e3914
  -....file:/C:/Scott/JBoss/Books/AdminDevel/education/books/admin-devel/examples/output/
  -  chap2/j0.jar
  -++++CodeSource:
  -    (file:/C:/Scott/JBoss/Books/AdminDevel/education/books/admin-devel/examples/output/
  -  chap2/j0.jar &lt;no certificates&gt;)
  +org.jboss.book.jmx.ex0.ExObj(f8968f).ClassLoader=java.net.URLClassLoader at 2611a7
  +..java.net.URLClassLoader at 2611a7
  +....file:/Users/orb/proj/jboss/jboss-docs/jbossas/j2ee/examples/output/jmx/j0.jar
  +++++CodeSource: (file:/Users/orb/proj/jboss/jboss-docs/jbossas/j2ee/examples/output/
  +                 jmx/j0.jar &lt;no signer certificates&gt;)
   Implemented Interfaces:
  -++interface java.io.Serializable(7934ad)
  +++interface java.io.Serializable(41b571)
   ++++ClassLoader: null
   ++++Null CodeSource
  - 
   [INFO,ExCtx] useValue2.ExObj class
  -org.jboss.chap2.ex0.ExObj(415de6).ClassLoader=java.net.URLClassLoader at 30e280
  -..java.net.URLClassLoader at 30e280
  -....file:/C:/Scott/JBoss/Books/AdminDevel/education/books/admin-devel/examples/output/
  -  chap2/j0.jar
  -++++CodeSource:
  -    (file:/C:/Scott/JBoss/Books/AdminDevel/education/books/admin-devel/examples/output/
  -  chap2/j0.jar &lt;no certificates&gt;)
  +org.jboss.book.jmx.ex0.ExObj(bc8e1e).ClassLoader=java.net.URLClassLoader at 6bd8ea
  +..java.net.URLClassLoader at 6bd8ea
  +....file:/Users/orb/proj/jboss/jboss-docs/jbossas/j2ee/examples/output/jmx/j0.jar
  +++++CodeSource: (file:/Users/orb/proj/jboss/jboss-docs/jbossas/j2ee/examples/output/
  +                 jmx/j0.jar &lt;no signer certificates&gt;)
   Implemented Interfaces:
  -++interface java.io.Serializable(7934ad)
  +++interface java.io.Serializable(41b571)
   ++++ClassLoader: null
   ++++Null CodeSource</programlisting>
                       </example>
                       <para>The first output prefixed with <literal>[INFO,UCL0]</literal> shows that the
                           <literal>ExObj</literal> class loaded at line <literal>ExCCEc.java:31</literal> has a hash code
  -                        of <literal>113fe2</literal> and an associated <literal>URLClassLoader</literal> instance with a
  -                        hash code of <literal>6e3914</literal>, which corresponds to ucl0. This is the class used to
  +                        of <literal>f8968f</literal> and an associated <literal>URLClassLoader</literal> instance with a
  +                        hash code of <literal>2611a7</literal>, which corresponds to ucl0. This is the class used to
                           create the instance passed to the <literal>ExCtx.useValue</literal> method. The second output
                           prefixed with <literal>[INFO,ExCtx]</literal> shows that the <literal>ExObj</literal> class as
                           seen in the context of the <literal>ExCtx.useValue</literal> method has a hash code of
  -                            <literal>415de6</literal> and a <literal>URLClassLoader</literal> instance with an
  -                        associated hash code of <literal>30e280</literal>, which corresponds to <literal>ucl1</literal>.
  +                            <literal>bc8e1e </literal> and a <literal>URLClassLoader</literal> instance with an
  +                        associated hash code of <literal>6bd8ea</literal>, which corresponds to <literal>ucl1</literal>.
                           So even though the <literal>ExObj</literal> classes are the same in terms of actual bytecode
                           since it comes from the same <literal>j0.jar</literal>, the classes are different as seen by
                           both the <literal>ExObj</literal> class hash codes, and the associated
  @@ -646,7 +640,7 @@
                       <example>
                           <title>The ExIAEd class used to demonstrate IllegalAccessException due to duplicate class
                               loaders</title>
  -                        <programlisting>package org.jboss.chap2.ex0;
  +                        <programlisting>package org.jboss.book.jmx.ex0;
   
   import java.io.File;
   import java.net.URL;
  @@ -662,7 +656,7 @@
    * An example of IllegalAccessExceptions due to
    * classes loaded by two class loaders.
    * @author Scott.Stark at jboss.org
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */
   public class ExIAEd
   {
  @@ -683,7 +677,7 @@
   	Debug.displayClassInfo(ExIAEd.class, buffer, false);
   	ucl0Log.info(buffer.toString());
   	
  -	Class ctxClass1 = ucl0.loadClass("org.jboss.chap2.ex0.ExCtx");
  +	Class ctxClass1 = ucl0.loadClass("org.jboss.book.jmx.ex0.ExCtx");
   	buffer.setLength(0);
   	buffer.append("ExCtx Info");
   	Debug.displayClassInfo(ctxClass1, buffer, false);
  @@ -707,36 +701,36 @@
                           loaded by the application class loader. We will run this example to demonstrate how the
                               <literal>IllegalAccessException</literal> can occur and then look at the specific issue with
                           the example. Run the example using the following command:</para>
  -                    <programlisting>[examples]$ ant -Dchap=chap2 -Dex=0d run-example
  +                    <programlisting>[examples]$ ant -Dchap=jmx -Dex=0d run-example
   Buildfile: build.xml
   ...
  -[java] [ERROR,UCL0] Failed to invoke ExCtx.pkgUseValue
  -[java] java.lang.IllegalAccessException: Class org.jboss.chap2.ex0.ExIAEd 
  -  can not access a member of class org.jboss.chap2.ex0.ExCtx with modifiers ""
  -[java] at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:57)
  -[java] at java.lang.reflect.Method.invoke(Method.java:317)
  -[java] at org.jboss.chap2.ex0.ExIAEd.main(ExIAEd.java:48)</programlisting>
  +[java] java.lang.IllegalAccessException: Class org.jboss.book.jmx.ex0.ExIAEd 
  +  can not access a member of class org.jboss.book.jmx.ex0.ExCtx with modifiers ""
  +[java]     at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
  +[java]     at java.lang.reflect.Method.invoke(Method.java:578)
  +[java]     at org.jboss.book.jmx.ex0.ExIAEd.main(ExIAEd.java:48)</programlisting>
  +
                       <para>The truncated output shown here illustrates the <literal>IllegalAccessException</literal>. The
  -                        full output can be found in the <literal>logs/chap2-ex0d.log</literal> file. At line 48 of
  +                        full output can be found in the <literal>logs/jmx-ex0d.log</literal> file. At line 48 of
                               <literal>ExIAEd.java</literal> the <literal>ExCtx.pkgUseValue(Object)</literal> method is
                           invoked via reflection. The <literal>pkgUseValue</literal> method has package protected access
                           and even though both the invoking class <literal>ExIAEd</literal> and the
                           <literal>ExCtx</literal> class whose method is being invoked reside in the
  -                            <literal>org.jboss.chap2.ex0</literal> package, the invocation is seen to be invalid due to
  +                            <literal>org.jboss.book.jmx.ex0</literal> package, the invocation is seen to be invalid due to
                           the fact that the two classes are loaded by different class loaders. This can be seen by looking
  -                        at the debugging output from the <literal>chap2-ex0d.log file</literal>.</para>
  +                        at the debugging output from the <literal>jmx-ex0d.log file</literal>.</para>
                       <programlisting>[INFO,UCL0] ExIAEd Info
  -org.jboss.chap2.ex0.ExIAEd(65855a).ClassLoader=sun.misc.Launcher$AppClassLoader at 3f52a5
  -..sun.misc.Launcher$AppClassLoader at 3f52a5
  +org.jboss.book.jmx.ex0.ExIAEd(7808b9).ClassLoader=sun.misc.Launcher$AppClassLoader at a9c85c
  +..sun.misc.Launcher$AppClassLoader at a9c85c
   ...
   [INFO,UCL0] ExCtx Info
  -org.jboss.chap2.ex0.ExCtx(70eed6).ClassLoader=java.net.URLClassLoader at 113fe2
  -..java.net.URLClassLoader at 113fe2
  +org.jboss.book.jmx.ex0.ExCtx(64c34e).ClassLoader=java.net.URLClassLoader at a9c85c
  +..java.net.URLClassLoader at 5d88a
   ...</programlisting>
                       <para>The ExIAEd class is seen to have been loaded via the default application class loader instance
  -                            <literal>sun.misc.Launcher$AppClassLoader at 3f52a5</literal>, while the
  +                            <literal>sun.misc.Launcher$AppClassLoader at a9c85c</literal>, while the
                           <literal>ExCtx</literal> class was loaded by the
  -                        <literal>java.net.URLClassLoader at 113fe2</literal> instance. Because the classes are loaded by
  +                        <literal>java.net.URLClassLoader at a9c85c</literal> instance. Because the classes are loaded by
                           different class loaders, access to the package protected method is seen to be a security
                           violation. So, not only is type a function of both the fully qualified class name and class
                           loader, the package scope is as well.</para>
  @@ -831,7 +825,7 @@
                       <example id="ch2.linkerror.ex">
                           <title>A concrete example of a LinkageError</title>
                           <!-- linenumbering="numbered" -->
  -                        <programlisting>package org.jboss.chap2.ex0;
  +                        <programlisting>package org.jboss.book.jmx.ex0;
   import java.io.File;
   import java.net.URL;
   
  @@ -844,7 +838,7 @@
    * than one class loader in a non-standard class loading environment.
    *
    * @author Scott.Stark at jboss.org
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */
   public class ExLE
   {
  @@ -860,8 +854,8 @@
           URL[] cp0 = {jar0.toURL()};
           Ex0URLClassLoader ucl0 = new Ex0URLClassLoader(cp0);
           Thread.currentThread().setContextClassLoader(ucl0);
  -        <emphasis role="bold">Class ctxClass1  = ucl0.loadClass("org.jboss.chap2.ex0.ExCtx");</emphasis>
  -        <emphasis role="bold">Class obj2Class1 = ucl0.loadClass("org.jboss.chap2.ex0.ExObj2");</emphasis>
  +        <emphasis role="bold">Class ctxClass1  = ucl0.loadClass("org.jboss.book.jmx.ex0.ExCtx");</emphasis>
  +        <emphasis role="bold">Class obj2Class1 = ucl0.loadClass("org.jboss.book.jmx.ex0.ExObj2");</emphasis>
           StringBuffer buffer = new StringBuffer("ExCtx Info");
           Debug.displayClassInfo(ctxClass1, buffer, false);
           ucl0Log.info(buffer.toString());
  @@ -875,7 +869,7 @@
           ucl1Log.info("jar1 path: "+jar1.toString());
           URL[] cp1 = {jar1.toURL()};
           Ex0URLClassLoader ucl1 = new Ex0URLClassLoader(cp1);
  -        <emphasis role="bold">Class obj2Class2 = ucl1.loadClass("org.jboss.chap2.ex0.ExObj2");</emphasis>
  +        <emphasis role="bold">Class obj2Class2 = ucl1.loadClass("org.jboss.book.jmx.ex0.ExObj2");</emphasis>
           buffer.setLength(0);
           buffer.append("ExObj2 Info, UCL1");
           Debug.displayClassInfo(obj2Class2, buffer, false);
  @@ -891,7 +885,7 @@
           }
       }
   }</programlisting>
  -                        <programlisting>package org.jboss.chap2.ex0;
  +                        <programlisting>package org.jboss.book.jmx.ex0;
   
   import java.net.URLClassLoader;
   import java.net.URL;
  @@ -903,7 +897,7 @@
    * model
    *
    * @author Scott.Stark at jboss.org
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */
   public class Ex0URLClassLoader extends URLClassLoader
   {
  @@ -999,21 +993,21 @@
                           prior to setting up the delegation relationship, the constraint will be violated and should
                           generate a <literal>LinkageError</literal> when run. Run the example using the following
                           command:</para>
  -                    <programlisting>[examples]$ ant -Dchap=chap2 -Dex=0e run-example
  +                    <programlisting>[examples]$ ant -Dchap=jmx -Dex=0e run-example
   Buildfile: build.xml
   ...
  -[java] java.lang.LinkageError: loader constraints violated when linking org/jboss/chap2/ex0/E
  -xObj2 class
  -[java] at org.jboss.chap2.ex0.ExCtx.&lt;init&gt;(ExCtx.java:24)
  +[java] java.lang.LinkageError: loader constraints violated when linking 
  +           org/jboss/book/jmx/ex0/ExObj2 class
  +[java]     at org.jboss.book.jmx.ex0.ExCtx.&lt;init&gt;(ExCtx.java:24)
   [java] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  -[java] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl
  -.java:39)
  -[java] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAcce
  -ssorImpl.java:27)
  -[java] at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
  -[java] at java.lang.Class.newInstance0(Class.java:308)
  -[java] at java.lang.Class.newInstance(Class.java:261)
  -[java] at org.jboss.chap2.ex0.ExLE.main(ExLE.java:53)</programlisting>
  +[java]     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessor
  +           Impl.java:39)     
  +[java]     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructor
  +           AccessorImpl.java:27)
  +[java]     at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
  +[java]     at java.lang.Class.newInstance0(Class.java:350)
  +[java]     at java.lang.Class.newInstance(Class.java:303)
  +[java]     at org.jboss.book.jmx.ex0.ExLE.main(ExLE.java:53)                        </programlisting>
                       <para>As expected, a LinkageError is thrown while validating the loader constraints required by line
                           24 of the <literal>ExCtx</literal> constructor.</para>
                       <section>
  @@ -2046,7 +2040,7 @@
   }</programlisting>
                   </example>
                   <para>To test the client access using the <literal>RMIAdaptor</literal>, run the following:</para>
  -                <programlisting>[examples]$ ant -Dchap=chap2 -Dex=4 run-example
  +                <programlisting>[examples]$ ant -Dchap=jmx -Dex=4 run-example
   ...
                    
   run-example4:
  @@ -3070,7 +3064,7 @@
                           without using any JBoss-specific classes. </para>
                       <example id="ch2.jndimap1.ex">
                           <title>JNDIMapMBean interface and implementation based on the service interface method pattern</title>
  -                        <programlisting>package org.jboss.chap2.ex1;
  +                        <programlisting>package org.jboss.book.jmx.ex1;
                   
   // The JNDIMap MBean interface
   import javax.naming.NamingException;
  @@ -3083,7 +3077,7 @@
       public void stop() throws Exception;
   }
   </programlisting>
  -                        <programlisting>package org.jboss.chap2.ex1;
  +                        <programlisting>package org.jboss.book.jmx.ex1;
   
   // The JNDIMap MBean implementation
   import java.util.HashMap;
  @@ -3163,7 +3157,7 @@
                       <example id="ch2.jndimap2.ex">
                           <title>JNDIMap MBean interface and implementation based on the ServiceMBean interface and
                               ServiceMBeanSupport class</title>
  -                        <programlisting>package org.jboss.chap2.ex2;
  +                        <programlisting>package org.jboss.book.jmx.ex2;
   
   // The JNDIMap MBean interface
   import javax.naming.NamingException;
  @@ -3173,7 +3167,7 @@
       public String getJndiName();
       public void setJndiName(String jndiName) throws NamingException;
   } </programlisting>
  -                        <programlisting>package org.jboss.chap2.ex2;
  +                        <programlisting>package org.jboss.book.jmx.ex2;
   // The JNDIMap MBean implementation
   import java.util.HashMap;
   import javax.naming.InitialContext;
  @@ -3240,11 +3234,11 @@
   }</programlisting>
                       </example>
                       <para>The source code for these MBeans along with the service descriptors is located in the
  -                            <literal>examples/src/main/org/jboss/chap2/{ex1,ex2}</literal> directories.</para>
  +                            <literal>examples/src/main/org/jboss/book/jmx/{ex1,ex2}</literal> directories.</para>
                       <para>The jboss-service.xml descriptor for the first version is shown below. </para>
                       <programlisting>&lt;!-- The SAR META-INF/jboss-service.xml descriptor --&gt;
   &lt;server&gt;
  -    &lt;mbean code="org.jboss.chap2.ex1.JNDIMap" 
  +    &lt;mbean code="org.jboss.book.jmx.ex1.JNDIMap" 
              name="chap2.ex1:service=JNDIMap"&gt;
           &lt;attribute name="JndiName"&gt;inmemory/maps/MapTest&lt;/attribute&gt;
           &lt;depends&gt;jboss:service=Naming&lt;/depends&gt;
  @@ -3286,13 +3280,13 @@
                               that adds the descriptive information about the attributes and operations and their
                               arguments. The following listing shows the <literal>jboss-service.xml</literal> descriptor
                               and the <literal>jndimap-xmbean1.xml</literal> XMBean descriptor. The source can be found in
  -                            the <literal>src/main/org/jboss/chap2/xmbean</literal> directory of the book examples.</para>
  +                            the <literal>src/main/org/jboss/book/jmx/xmbean</literal> directory of the book examples.</para>
                           <programlisting>&lt;?xml version='1.0' encoding='UTF-8' ?&gt;
   &lt;!DOCTYPE server PUBLIC    
                        "-//JBoss//DTD MBean Service 3.2//EN"
                        "http://www.jboss.org/j2ee/dtd/jboss-service_3_2.dtd"&gt;
   &lt;server&gt;
  -    &lt;mbean code="org.jboss.chap2.xmbean.JNDIMap"
  +    &lt;mbean code="org.jboss.book.jmx.xmbean.JNDIMap"
              name="chap2.xmbean:service=JNDIMap" 
              xmbean-dd="META-INF/jndimap-xmbean.xml"&gt;
           &lt;attribute name="JndiName"&gt;inmemory/maps/MapTest&lt;/attribute&gt;
  @@ -3379,48 +3373,44 @@
           &lt;description&gt;The notification sent whenever a value is get into the map
               managed by the service&lt;/description&gt;
           &lt;name&gt;javax.management.Notification&lt;/name&gt;
  -        &lt;notification-type&gt;org.jboss.chap2.xmbean.JNDIMap.get&lt;/notification-type&gt;
  +        &lt;notification-type&gt;org.jboss.book.jmx.xmbean.JNDIMap.get&lt;/notification-type&gt;
       &lt;/notification&gt;
       &lt;notification&gt;
           &lt;description&gt;The notification sent whenever a value is put into the map
               managed by the service&lt;/description&gt;
           &lt;name&gt;javax.management.Notification&lt;/name&gt;
  -        &lt;notification-type&gt;org.jboss.chap2.xmbean.JNDIMap.put&lt;/notification-type&gt;
  +        &lt;notification-type&gt;org.jboss.book.jmx.xmbean.JNDIMap.put&lt;/notification-type&gt;
       &lt;/notification&gt;
   &lt;/mbean&gt;</programlisting>
                           <para>You can build, deploy and test the XMBean as follows:</para>
  -                        <programlisting>[examples]$ ant -Dchap=chap2 -Dex=xmbean1  run-example
  +                        <programlisting>[examples]$ ant -Dchap=jmx -Dex=xmbean1 run-example
   ...
   run-examplexmbean1:
  -     [copy] Copying 1 file to /tmp/jboss-4.0.2/server/default/deploy
        [java] JNDIMap Class: org.jboss.mx.modelmbean.XMBean
        [java] JNDIMap Operations: 
        [java]  + void start()
        [java]  + void stop()
  -     [java]  + void put(java.lang.Object chap2.xmbean:service=JNDIMap,java.lang.Object cha
  -p2.xmbean:service=JNDIMap)
  +     [java]  + void put(java.lang.Object chap2.xmbean:service=JNDIMap,java.lang.Object 
  +                        chap2.xmbean:service=JNDIMap)
        [java]  + java.lang.Object get(java.lang.Object chap2.xmbean:service=JNDIMap)
  -     [java]  + java.lang.String getJndiName()
  -     [java]  + void setJndiName(java.lang.String chap2.xmbean:service=JNDIMap)
  -     [java]  + [Ljava.lang.String; getInitialValues()
  -     [java]  + void setInitialValues([Ljava.lang.String; chap2.xmbean:service=JNDIMap)
  -     [java] handleNotification, event: null
  +     [java] name=chap2.xmbean:service=JNDIMap
  +     [java] listener=org.jboss.book.jmx.xmbean.TestXMBean1$Listener at f38cf0
        [java] key=key0, value=value0
  -     [java] handleNotification, event: javax.management.Notification[source=chap2.xmbean:s
  -ervice=JNDIMap,type=org.jboss.chap2.xmbean.JNDIMap.put,sequenceNumber=3,timeStamp=10986315
  -27823,message=null,userData=null]
  +     [java] handleNotification, event: javax.management.Notification[source=chap2.xmbean:
  +            service=JNDIMap][type=org.jboss.book.jmx.xmbean.JNDIMap.put][message=]
        [java] JNDIMap.put(key1, value1) successful
  -     [java] handleNotification, event: javax.management.Notification[source=chap2.xmbean:s
  -ervice=JNDIMap,type=org.jboss.chap2.xmbean.JNDIMap.get,sequenceNumber=4,timeStamp=10986315
  -27940,message=null,userData=null]
  +     [java] handleNotification, event: javax.management.Notification[source=chap2.xmbean:
  +            service=JNDIMap][type=org.jboss.book.jmx.xmbean.JNDIMap.get][message=]
        [java] JNDIMap.get(key0): null
  -     [java] handleNotification, event: javax.management.Notification[source=chap2.xmbean:s
  -ervice=JNDIMap,type=org.jboss.chap2.xmbean.JNDIMap.get,sequenceNumber=5,timeStamp=10986315
  -27985,message=null,userData=null]
  +     [java] handleNotification, event: javax.management.Notification[source=chap2.xmbean:
  +            service=JNDIMap][type=org.jboss.book.jmx.xmbean.JNDIMap.get][message=]
        [java] JNDIMap.get(key1): value1
  -     [java] handleNotification, event: javax.management.Notification[source=chap2.xmbean:s
  -ervice=JNDIMap,type=org.jboss.chap2.xmbean.JNDIMap.put,sequenceNumber=6,timeStamp=10986315
  -27999,message=null,userData=null]</programlisting>
  +     [java] handleNotification, event: javax.management.Notification[source=chap2.xmbean:
  +            service=JNDIMap][type=org.jboss.book.jmx.xmbean.JNDIMap.put][message=]
  +     [java] handleNotification, event: javax.management.AttributeChangeNotification[source
  +            =chap2.xmbean:service=JNDIMap][type=jmx.attribute.change][message=InitialValues 
  +            changed from javax.management.Attribute at 82a72a to 
  +            javax.management.Attribute at acdb96]</programlisting>
                           <para>The functionality is largely the same as the Standard MBean with the notable exception of
                               the JMX notifications. A Standard MBean has no way of declaring that it will emit
                               notifications. An XMBean may declare the notifications it emits using notification elements
  @@ -3529,17 +3519,17 @@
           &lt;description&gt;The notification sent whenever a value is get into the map
               managed by the service&lt;/description&gt;
           &lt;name&gt;javax.management.Notification&lt;/name&gt;
  -        &lt;notification-type&gt;org.jboss.chap2.xmbean.JNDIMap.get&lt;/notification-type&gt;
  +        &lt;notification-type&gt;org.jboss.book.jmx.xmbean.JNDIMap.get&lt;/notification-type&gt;
       &lt;/notification&gt;
       &lt;notification&gt;
           &lt;description&gt;The notification sent whenever a value is put into the map
               managed by the service&lt;/description&gt;
           &lt;name&gt;javax.management.Notification&lt;/name&gt;
  -        &lt;notification-type&gt;org.jboss.chap2.xmbean.JNDIMap.put&lt;/notification-type&gt;
  +        &lt;notification-type&gt;org.jboss.book.jmx.xmbean.JNDIMap.put&lt;/notification-type&gt;
       &lt;/notification&gt;
   &lt;/mbean&gt;</programlisting>
                           <para>Build, deploy and test the version 2 XMBean as follows:</para>
  -                        <programlisting>[examples]$ ant -Dchap=chap2 -Dex=xmbean2 -Djboss.deploy.conf=rmi-adaptor run-example
  +                        <programlisting>[examples]$ ant -Dchap=jmx -Dex=xmbean2 -Djboss.deploy.conf=rmi-adaptor run-example
   ...
   run-examplexmbean2:
        [java] JNDIMap Class: org.jboss.mx.modelmbean.XMBean
  @@ -3574,28 +3564,28 @@
                               because we have done nothing to test that changes to attribute value are actually persisted.
                               Perform this test by running example xmbean2a several times:</para>
                           <para>
  -                            <programlisting>[examples] ant -Dchap=chap2 -Dex=xmbean2a run-example
  +                            <programlisting>[examples] ant -Dchap=jmx -Dex=xmbean2a run-example
   ...
        [java] InitialValues.length=2
        [java] key=key10, value=value10</programlisting>
  -                            <programlisting>[examples] ant -Dchap=chap2 -Dex=xmbean2a run-example
  +                            <programlisting>[examples] ant -Dchap=jmx -Dex=xmbean2a run-example
   ...
        [java] InitialValues.length=4
        [java] key=key10, value=value10
        [java] key=key2, value=value2</programlisting>
                           </para>
                           <para>  
  -                            <programlisting>[examples] ant -Dchap=chap2 -Dex=xmbean2a run-example
  +                            <programlisting>[examples] ant -Dchap=jmx -Dex=xmbean2a run-example
   ...
        [java] InitialValues.length=6
        [java] key=key10, value=value10
        [java] key=key2, value=value2
        [java] key=key3, value=value3</programlisting>
                           </para>
  -                        <para>The <literal>org.jboss.chap2.xmbean.TestXMBeanRestart</literal> used in this example
  +                        <para>The <literal>org.jboss.book.jmx.xmbean.TestXMBeanRestart</literal> used in this example
                               obtains the current <literal>InitialValues</literal> attribute setting, and then adds
                               another key/value pair to it. The client code is shown below.</para>
  -                        <programlisting>package org.jboss.chap2.xmbean;
  +                        <programlisting>package org.jboss.book.jmx.xmbean;
   
   import javax.management.Attribute;
   import javax.management.ObjectName;
  @@ -3610,7 +3600,7 @@
    *  list.
    *  
    *  @author Scott.Stark at jboss.org
  - *  @version $Revision: 1.1 $
  + *  @version $Revision: 1.2 $
    */
   public class TestXMBeanRestart
   {
  @@ -3648,7 +3638,7 @@
   }</programlisting>
                           <para>At this point you may even shutdown the JBoss server, restart it and then rerun the
                               initial example to see if the changes are persisted across server restarts:</para>
  -                        <programlisting>[examples]$ ant -Dchap=chap2 -Dex=xmbean2 run-example
  +                        <programlisting>[examples]$ ant -Dchap=jmx -Dex=xmbean2 run-example
   ...
    
   run-examplexmbean2:
  @@ -3669,29 +3659,29 @@
        [java] <emphasis role="bold">key=key3, value=value3</emphasis>
        [java] <emphasis role="bold">key=key4, value=value4</emphasis>
        [java] handleNotification, event: javax.management.Notification[source=chap2.xmbean:s
  -ervice=JNDIMap,type=org.jboss.chap2.xmbean.JNDIMap.put,sequenceNumber=3,timeStamp=10986336
  -64712,message=null,userData=null]
  +ervice=JNDIMap,type=org.jboss.book.jmx.xmbean.JNDIMap.put,sequenceNumber=3,timeStamp=10986
  +33664712,message=null,userData=null]
        [java] JNDIMap.put(key1, value1) successful
        [java] handleNotification, event: javax.management.Notification[source=chap2.xmbean:s
  -ervice=JNDIMap,type=org.jboss.chap2.xmbean.JNDIMap.get,sequenceNumber=4,timeStamp=10986336
  -64821,message=null,userData=null]
  +ervice=JNDIMap,type=org.jboss.book.jmx.xmbean.JNDIMap.get,sequenceNumber=4,timeStamp=10986
  +33664821,message=null,userData=null]
        [java] JNDIMap.get(key0): null
        [java] handleNotification, event: javax.management.Notification[source=chap2.xmbean:s
  -ervice=JNDIMap,type=org.jboss.chap2.xmbean.JNDIMap.get,sequenceNumber=5,timeStamp=10986336
  -64860,message=null,userData=null]
  +ervice=JNDIMap,type=org.jboss.book.jmx.xmbean.JNDIMap.get,sequenceNumber=5,timeStamp=10986
  +33664860,message=null,userData=null]
        [java] JNDIMap.get(key1): value1
        [java] handleNotification, event: javax.management.Notification[source=chap2.xmbean:s
  -ervice=JNDIMap,type=org.jboss.chap2.xmbean.JNDIMap.put,sequenceNumber=6,timeStamp=10986336
  -64877,message=null,userData=null]
  +ervice=JNDIMap,type=org.jboss.book.jmx.xmbean.JNDIMap.put,sequenceNumber=6,timeStamp=10986
  +33664877,message=null,userData=null]
        [java] handleNotification, event: javax.management.Notification[source=chap2.xmbean:s
  -ervice=JNDIMap,type=org.jboss.chap2.xmbean.JNDIMap.put,sequenceNumber=7,timeStamp=10986336
  -64895,message=null,userData=null]
  +ervice=JNDIMap,type=org.jboss.book.jmx.xmbean.JNDIMap.put,sequenceNumber=7,timeStamp=10986
  +33664895,message=null,userData=null]
        [java] handleNotification, event: javax.management.Notification[source=chap2.xmbean:s
  -ervice=JNDIMap,type=org.jboss.chap2.xmbean.JNDIMap.put,sequenceNumber=8,timeStamp=10986336
  -64899,message=null,userData=null]
  +ervice=JNDIMap,type=org.jboss.book.jmx.xmbean.JNDIMap.put,sequenceNumber=8,timeStamp=10986
  +33664899,message=null,userData=null]
        [java] handleNotification, event: javax.management.Notification[source=chap2.xmbean:s
  -ervice=JNDIMap,type=org.jboss.chap2.xmbean.JNDIMap.put,sequenceNumber=9,timeStamp=10986336
  -65614,message=null,userData=null]   </programlisting>
  +ervice=JNDIMap,type=org.jboss.book.jmx.xmbean.JNDIMap.put,sequenceNumber=9,timeStamp=10986
  +33665614,message=null,userData=null]   </programlisting>
                           <para>You see that the last <literal>InitialValues</literal> attribute setting is in fact
                               visible.</para>
                       </section>
  @@ -3729,7 +3719,7 @@
                           interact with the XMBean through RMI style calls instead
                           of the <literal>RMIAdaptor</literal> and MBean Server
                           style used previously.</para>
  -                    <programlisting>package org.jboss.chap2.xmbean;
  +                    <programlisting>package org.jboss.book.jmx.xmbean;
   
   import javax.naming.InitialContext;
   import org.jboss.security.SecurityAssociation;
  @@ -3738,7 +3728,7 @@
   /** 
    *  A client that accesses an XMBean through its RMI interface
    *  @author Scott.Stark at jboss.org
  - *  @version $Revision: 1.1 $
  + *  @version $Revision: 1.2 $
    */
   public class TestXMBean3
   {
  @@ -3806,9 +3796,9 @@
       &lt;description&gt;The JNDIMap XMBean Example Version 3&lt;/description&gt;
       &lt;descriptors&gt;
           &lt;interceptors&gt;
  -            &lt;interceptor code="org.jboss.chap2.xmbean.ServerSecurityInterceptor" 
  +            &lt;interceptor code="org.jboss.book.jmx.xmbean.ServerSecurityInterceptor" 
                            adminName="admin"/&gt;
  -            &lt;interceptor code="org.jboss.chap2.xmbean.InvokerInterceptor"/&gt;
  +            &lt;interceptor code="org.jboss.book.jmx.xmbean.InvokerInterceptor"/&gt;
               &lt;interceptor code="org.jboss.mx.interceptor.PersistenceInterceptor2"/&gt;
               &lt;interceptor code="org.jboss.mx.interceptor.ModelMBeanInterceptor"/&gt;
               &lt;interceptor code="org.jboss.mx.interceptor.ObjectReferenceInterceptor"/&gt;
  @@ -3884,9 +3874,9 @@
                           element shown in bold in the listing. This defines the
                           interceptor stack through which all MBean attribute
                           access and operations pass. The first two interceptors,
  -                        <literal>org.jboss.chap2.xmbean.ServerSecurityInterceptor</literal>
  +                        <literal>org.jboss.book.jmx.xmbean.ServerSecurityInterceptor</literal>
                           and
  -                        <literal>org.jboss.chap2.xmbean.InvokerInterceptor</literal>
  +                        <literal>org.jboss.book.jmx.xmbean.InvokerInterceptor</literal>
                           are the example custom interceptors. The remaining three
                           interceptors are the standard ModelMBean interceptors.
                           Because we have a persistence policy of
  @@ -3907,7 +3897,7 @@
    * @see org.jboss.mx.interceptor.LogInterceptor
    *
    * @author &lt;a href="mailto:juha at jboss.org"&gt;Juha Lindfors&lt;/a&gt;.
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    *
    */
   public class AbstractInterceptor implements Interceptor
  @@ -3961,7 +3951,7 @@
                           <literal>ServerSecurityInterceptor</literal> intercepts
                           invoke operations and validates that the
                           <literal>Invocation</literal> context include an admin principal.</para>
  -                    <programlisting>package org.jboss.chap2.xmbean;
  +                    <programlisting>package org.jboss.book.jmx.xmbean;
   
   import java.security.Principal;
   
  @@ -3977,7 +3967,7 @@
    * single principal
    *
    * @author Scott.Stark at jboss.org
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */
    
   public class ServerSecurityInterceptor extends AbstractInterceptor
  @@ -4021,7 +4011,7 @@
   }</programlisting>
                       <para>The InvokerInterceptor implements the detached invoker
                           pattern. This is discussed in detail in <xref linkend="ch2.remoteaccess.sect"/>.</para>
  -                    <programlisting>package org.jboss.chap2.xmbean;
  +                    <programlisting>package org.jboss.book.jmx.xmbean;
   
   import java.lang.reflect.Method;
   import java.util.HashMap;
  @@ -4038,7 +4028,7 @@
   /** An interceptor that handles the
    *
    * @author Scott.Stark at jboss.org
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */
   public class InvokerInterceptor 
       extends AbstractInterceptor
  @@ -4180,7 +4170,7 @@
                           interceptor stack.</para>
                       <programlisting>&lt;?xml version='1.0' encoding='UTF-8' ?&gt;
   &lt;server&gt;
  -    &lt;mbean code="org.jboss.chap2.xmbean.JNDIMap"
  +    &lt;mbean code="org.jboss.book.jmx.xmbean.JNDIMap"
           name="chap2.xmbean:service=JNDIMap,version=3" 
           xmbean-dd="META-INF/jndimap-xmbean3.xml"&gt;
           &lt;attribute name="JndiName"&gt;inmemory/maps/MapTest&lt;/attribute&gt;
  @@ -4196,7 +4186,7 @@
           &lt;attribute name="TargetName"&gt;chap2.xmbean:service=JNDIMap,version=3&lt;/attribute&gt;
           &lt;attribute name="JndiName"&gt;secure-xmbean/ClientInterface&lt;/attribute&gt;
           &lt;attribute name="ExportedInterface"&gt;
  -            org.jboss.chap2.xmbean.ClientInterface
  +            org.jboss.book.jmx.xmbean.ClientInterface
           &lt;/attribute&gt;
           &lt;attribute name="ClientInterceptors"&gt;
               &lt;iterceptors&gt;
  @@ -4211,7 +4201,7 @@
   &lt;/server&gt;</programlisting>
                       
                
  -                    <programlisting>[examples]$ ant -Dchap=chap2 -Dex=xmbean3 run-example
  +                    <programlisting>[examples]$ ant -Dchap=jmx -Dex=xmbean3 run-example
   ...
   run-examplexmbean3:
        [java] Called to getInitialValues failed as expected: Caller=null is not allowed access
  @@ -4220,7 +4210,7 @@
        [java] JNDIMap.get(key0): null
        [java] JNDIMap.get(key1): value1
        [java] key=key0.1, value=value0.2</programlisting>
  -                    <programlisting>[examples]$ ant -Dchap=chap2 -Dex=xmbean3 run-example
  +                    <programlisting>[examples]$ ant -Dchap=jmx -Dex=xmbean3 run-example
   ...
   run-examplexmbean3:
        [java] Called to getInitialValues failed as expected: Caller=null is not allowed access
  @@ -4247,25 +4237,25 @@
                       deployment ordering.You will need to explicitly state your MBean dependencies if your packaging
                       structure does not happen to resolve the dependencies. Let's consider an example component
                       deployment that consists of an MBean that uses an EJB. Here is the structure of the example EAR.</para>
  -                <programlisting><emphasis role="bold">output/chap2/chap2-ex3.ear</emphasis>
  +                <programlisting><emphasis role="bold">output/jmx/jmx-ex3.ear</emphasis>
   +- META-INF/MANIFEST.MF
   +- META-INF/jboss-app.xml
  -+- chap2-ex3.jar (archive) [EJB jar]
  ++- jmx-ex3.jar (archive) [EJB jar]
   | +- META-INF/MANIFEST.MF
   | +- META-INF/ejb-jar.xml
  -| +- org/jboss/chap2/ex3/EchoBean.class
  -| +- org/jboss/chap2/ex3/EchoLocal.class
  -| +- org/jboss/chap2/ex3/EchoLocalHome.class
  -+- chap2-ex3.sar (archive) [MBean sar]
  +| +- org/jboss/book/jmx/ex3/EchoBean.class
  +| +- org/jboss/book/jmx/ex3/EchoLocal.class
  +| +- org/jboss/book/jmx/ex3/EchoLocalHome.class
  ++- jmx-ex3.sar (archive) [MBean sar]
   | +- META-INF/MANIFEST.MF
   | +- META-INF/jboss-service.xml
  -| +- org/jboss/chap2/ex3/EjbMBeanAdaptor.class
  +| +- org/jboss/book/jmx/ex3/EjbMBeanAdaptor.class
   +- META-INF/application.xml</programlisting>
  -                <para>The EAR contains a <literal>chap2-ex3.jar</literal> and <literal>chap2-ex3.sar</literal>. The
  -                        <literal>chap2-ex3.jar</literal> is the EJB archive and the <literal>chap2-ex3.sar</literal> is
  +                <para>The EAR contains a <literal>jmx-ex3.jar</literal> and <literal>jmx-ex3.sar</literal>. The
  +                        <literal>jmx-ex3.jar</literal> is the EJB archive and the <literal>jmx-ex3.sar</literal> is
                       the MBean service archive. We have implemented the service as a Dynamic MBean to provide an
                       illustration of their use.</para>
  -                <programlisting>package org.jboss.chap2.ex3;
  +                <programlisting>package org.jboss.book.jmx.ex3;
               
   import java.lang.reflect.Method;
   import javax.ejb.CreateException;
  @@ -4293,7 +4283,7 @@
    *  An example of a DynamicMBean that exposes select attributes and
    *  operations of an EJB as an MBean.
    *  @author Scott.Stark at jboss.org
  - *  @version $Revision: 1.1 $
  + *  @version $Revision: 1.2 $
    */
   public class EjbMBeanAdaptor extends ServiceMBeanSupport
       implements DynamicMBean
  @@ -4673,7 +4663,7 @@
                       is: <literal>"jboss.j2ee:service=EJB,jndiName=" + &lt;home-jndi-name&gt;</literal> where the
                       &lt;home-jndi-name&gt; is the EJB home interface JNDI name.</para>
                   <programlisting>&lt;server&gt;
  -    &lt;mbean code="org.jboss.chap2.ex3.EjbMBeanAdaptor"
  +    &lt;mbean code="org.jboss.book.jmx.ex3.EjbMBeanAdaptor"
              name="jboss.book:service=EjbMBeanAdaptor"&gt;
           &lt;attribute name="HelloPrefix"&gt;AdaptorPrefix&lt;/attribute&gt;
           &lt;attribute name="EjbJndiName"&gt;local/chap2.EchoBean&lt;/attribute&gt;
  @@ -4681,82 +4671,55 @@
       &lt;/mbean&gt;
   &lt;/server&gt;    </programlisting>
                   <para>Deploy the example ear by running:</para>
  -                <programlisting>[examples]$ ant -Dchap=chap2 -Dex=3 run-example</programlisting>
  +                <programlisting>[examples]$ ant -Dchap=jmx -Dex=3 run-example</programlisting>
                   <para>On the server console there will be messages similar to the following:</para>
                   <programlisting>14:57:12,906 INFO  [EARDeployer] Init J2EE application: file:/private/tmp/jboss-4.0.1/server/
   default/deploy/chap2-ex3.ear
   14:57:13,044 INFO  [EjbMBeanAdaptor] Don't panic, just a stack trace
   java.lang.Throwable: getMBeanInfo trace
  -        at org.jboss.chap2.ex3.EjbMBeanAdaptor.getMBeanInfo(EjbMBeanAdaptor.java:153)
  -        at org.jboss.mx.server.RawDynamicInvoker.getMBeanInfo(RawDynamicInvoker.java:172)
  -        at org.jboss.mx.server.RawDynamicInvoker.preRegister(RawDynamicInvoker.java:187)
  +  at org.jboss.book.jmx.ex3.EjbMBeanAdaptor.getMBeanInfo(EjbMBeanAdaptor.java:153)
   ...
   14:57:13,088 INFO  [EjbMBeanAdaptor] preRegister notification seen
   14:57:13,093 INFO  [EjbMBeanAdaptor] Don't panic, just a stack trace
   java.lang.Throwable: getMBeanInfo trace
  -        at org.jboss.chap2.ex3.EjbMBeanAdaptor.getMBeanInfo(EjbMBeanAdaptor.java:153)
  -        at org.jboss.mx.server.RawDynamicInvoker.getMBeanInfo(RawDynamicInvoker.java:172)
  -        at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.j
  -ava:207)
  +  at org.jboss.book.jmx.ex3.EjbMBeanAdaptor.getMBeanInfo(EjbMBeanAdaptor.java:153)
   ...
   14:57:13,117 INFO  [EjbMBeanAdaptor] Don't panic, just a stack trace
   java.lang.Throwable: getMBeanInfo trace
  -        at org.jboss.chap2.ex3.EjbMBeanAdaptor.getMBeanInfo(EjbMBeanAdaptor.java:153)
  -        at org.jboss.mx.server.RawDynamicInvoker.getMBeanInfo(RawDynamicInvoker.java:172)
  -        at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.j
  -ava:235)
  +  at org.jboss.book.jmx.ex3.EjbMBeanAdaptor.getMBeanInfo(EjbMBeanAdaptor.java:153)
   ...        
   14:57:13,140 WARN  [EjbMBeanAdaptor] Unexcepted error accessing MBeanInfo for null
   java.lang.NullPointerException
           at org.jboss.system.ServiceMBeanSupport.postRegister(ServiceMBeanSupport.java:418)
  -        at org.jboss.mx.server.RawDynamicInvoker.postRegister(RawDynamicInvoker.java:226)
  -        at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.j
  -ava:312)
   ...
   14:57:13,203 INFO  [EjbMBeanAdaptor] Don't panic, just a stack trace
   java.lang.Throwable: getMBeanInfo trace
  -        at org.jboss.chap2.ex3.EjbMBeanAdaptor.getMBeanInfo(EjbMBeanAdaptor.java:153)
  -        at org.jboss.mx.server.RawDynamicInvoker.getMBeanInfo(RawDynamicInvoker.java:172)
  -        at org.jboss.mx.server.MBeanServerImpl.getMBeanInfo(MBeanServerImpl.java:481)
  +  at org.jboss.book.jmx.ex3.EjbMBeanAdaptor.getMBeanInfo(EjbMBeanAdaptor.java:153)
   ... 
   14:57:13,232 INFO  [EjbMBeanAdaptor] Don't panic, just a stack trace
   java.lang.Throwable: getMBeanInfo trace
  -        at org.jboss.chap2.ex3.EjbMBeanAdaptor.getMBeanInfo(EjbMBeanAdaptor.java:153)
  -        at org.jboss.mx.server.RawDynamicInvoker.getMBeanInfo(RawDynamicInvoker.java:172)
  -        at org.jboss.mx.server.MBeanServerImpl.getMBeanInfo(MBeanServerImpl.java:481)
  +  at org.jboss.book.jmx.ex3.EjbMBeanAdaptor.getMBeanInfo(EjbMBeanAdaptor.java:153)
   ...
   14:57:13,420 INFO  [EjbModule] Deploying Chap2EchoInfoBean
   14:57:13,443 INFO  [EjbModule] Deploying chap2.EchoBean
   14:57:13,488 INFO  [EjbMBeanAdaptor] Don't panic, just a stack trace
   java.lang.Throwable: getMBeanInfo trace
  -        at org.jboss.chap2.ex3.EjbMBeanAdaptor.getMBeanInfo(EjbMBeanAdaptor.java:153)
  -        at org.jboss.mx.server.RawDynamicInvoker.getMBeanInfo(RawDynamicInvoker.java:172)
  -        at org.jboss.mx.server.MBeanServerImpl.getMBeanInfo(MBeanServerImpl.java:481)
  +  at org.jboss.book.jmx.ex3.EjbMBeanAdaptor.getMBeanInfo(EjbMBeanAdaptor.java:153)
   ...
   14:57:13,542 INFO  [EjbMBeanAdaptor] Don't panic, just a stack trace
   java.lang.Throwable: getMBeanInfo trace
  -        at org.jboss.chap2.ex3.EjbMBeanAdaptor.getMBeanInfo(EjbMBeanAdaptor.java:153)
  -        at org.jboss.mx.server.RawDynamicInvoker.getMBeanInfo(RawDynamicInvoker.java:172)
  -        at org.jboss.mx.server.MBeanServerImpl.getMBeanInfo(MBeanServerImpl.java:481)
  +  at org.jboss.book.jmx.ex3.EjbMBeanAdaptor.getMBeanInfo(EjbMBeanAdaptor.java:153)
   ...
   14:57:13,558 INFO  [EjbMBeanAdaptor] Begin invoke, actionName=create
   14:57:13,560 INFO  [EjbMBeanAdaptor] Notified of create state
   14:57:13,562 INFO  [EjbMBeanAdaptor] End invoke, actionName=create
   14:57:13,604 INFO  [EjbMBeanAdaptor] Don't panic, just a stack trace
   java.lang.Throwable: getMBeanInfo trace
  -        at org.jboss.chap2.ex3.EjbMBeanAdaptor.getMBeanInfo(EjbMBeanAdaptor.java:153)
  -        at org.jboss.mx.server.RawDynamicInvoker.getMBeanInfo(RawDynamicInvoker.java:172)
  -        at org.jboss.mx.server.MBeanServerImpl.getMBeanInfo(MBeanServerImpl.java:481)
  -        at org.jboss.mx.server.MBeanServerImpl.isInstanceOf(MBeanServerImpl.java:639)
  +  at org.jboss.book.jmx.ex3.EjbMBeanAdaptor.getMBeanInfo(EjbMBeanAdaptor.java:153)
   ... 
   14:57:13,621 INFO  [EjbMBeanAdaptor] Don't panic, just a stack trace
   java.lang.Throwable: getMBeanInfo trace
  -        at org.jboss.chap2.ex3.EjbMBeanAdaptor.getMBeanInfo(EjbMBeanAdaptor.java:153)
  -        at org.jboss.mx.server.RawDynamicInvoker.getMBeanInfo(RawDynamicInvoker.java:172)
  -        at org.jboss.mx.server.MBeanServerImpl.getMBeanInfo(MBeanServerImpl.java:481)
  -        at org.jboss.mx.util.JMXInvocationHandler.&lt;init&gt;(JMXInvocationHandler.java:110)
  -        at org.jboss.mx.util.MBeanProxy.get(MBeanProxy.java:76)
  -        at org.jboss.mx.util.MBeanProxy.get(MBeanProxy.java:64)
  +  at org.jboss.book.jmx.ex3.EjbMBeanAdaptor.getMBeanInfo(EjbMBeanAdaptor.java:153)
   14:57:13,641 INFO  [EjbMBeanAdaptor] Begin invoke, actionName=getState
   14:57:13,942 INFO  [EjbMBeanAdaptor] Begin invoke, actionName=start
   14:57:13,944 INFO  [EjbMBeanAdaptor] Notified of start state
  @@ -4764,11 +4727,10 @@
   14:57:13,983 INFO  [EchoBean] echo, info=echo info, arg=, arg=startService
   14:57:13,986 INFO  [EjbMBeanAdaptor] echo(startService) = startService
   14:57:13,988 INFO  [EjbMBeanAdaptor] End invoke, actionName=start
  -14:57:13,991 INFO  [EJBDeployer] Deployed: file:/private/tmp/jboss-4.0.1/server/default/tmp/d
  -eploy/tmp1418chap2-ex3.ear-contents/chap2-ex3.jar
  -14:57:14,075 INFO  [EARDeployer] Started J2EE application: file:/private/tmp/jboss-4.0.1/serv
  -er/default/deploy/chap2-ex3.ear</programlisting>
  -                <para>The stack traces are not exceptions. They are traces coming from line 150 of the
  +14:57:13,991 INFO  [EJBDeployer] Deployed: file:/tmp/jboss-4.0.5.GA/server/default/tmp/deploy
  +/tmp60550jmx-ex3.ear-contents/jmx-ex3.jar                    
  +14:57:14,075 INFO  [EARDeployer] Started J2EE application: ...</programlisting>
  +                <para>The stack traces are not exceptions. They are traces coming from the
                           <literal>EjbMBeanAdaptor</literal> code to demonstrate that clients ask for the MBean interface
                       when they want to discover the MBean's capabilities. Notice that the EJB container (lines with
                       [EjbModule]) is started before the example MBean (lines with [EjbMBeanAdaptor]).</para>
  @@ -10973,7 +10935,7 @@
               </itemizedlist>
               <para>In the following sections we will look at examples of the various JMS messaging models and message
                   driven beans. The chapter example source is located under the
  -                <literal>src/main/org/jboss/chap6</literal> directory of the book examples.</para>
  +                <literal>src/main/org/jboss/book/jms</literal> directory of the book examples.</para>
               <section>
                   <title>A Point-To-Point Example</title>
                   <para>Let's start out with a point-to-point (P2P) example. In the P2P model, a sender delivers messages
  @@ -10983,7 +10945,7 @@
                           <literal>queue/testQueue</literal> and asynchronously receives the message from the same queue.</para>
                   <example id="ch6.p2pjmsclient.ex">
                       <title>A P2P JMS client example</title>
  -                    <programlisting>package org.jboss.chap6.ex1;
  +                    <programlisting>package org.jboss.book.jms.ex1;
   
   import javax.jms.JMSException;
   import javax.jms.Message;
  @@ -11008,7 +10970,7 @@
    * message from the same Queue.
    * 
    * @author  Scott.Stark at jboss.org
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */
   public class SendRecvClient
   {
  @@ -11094,7 +11056,7 @@
   }</programlisting>
                   </example>
                   <para>The client may be run using the following command line:</para>
  -                <programlisting>[examples]$ ant -Dchap=chap6 -Dex=1p2p run-example
  +                <programlisting>[examples]$ ant -Dchap=jms -Dex=1p2p run-example
   ...
   run-example1p2p:
        [java] [INFO,SendRecvClient] Begin SendRecvClient, now=1102808673386
  @@ -11113,7 +11075,7 @@
                       message from the same topic.</para>
                   <example>
                       <title>A Pub-Sub JMS client example</title>
  -                    <programlisting>package org.jboss.chap6.ex1;
  +                    <programlisting>package org.jboss.book.jms.ex1;
   
   import javax.jms.JMSException;
   import javax.jms.Message;
  @@ -11136,7 +11098,7 @@
    *  Topic.
    * 
    *  @author Scott.Stark at jboss.org
  - *  @version $Revision: 1.1 $
  + *  @version $Revision: 1.2 $
    */
   
   public class TopicSendRecvClient
  @@ -11214,7 +11176,7 @@
   }</programlisting>
                   </example>
                   <para>The client may be run using the following command line:</para>
  -                <programlisting>[examples]$ ant -Dchap=chap6 -Dex=1ps run-example
  +                <programlisting>[examples]$ ant -Dchap=jms -Dex=1ps run-example
   ...
   run-example1ps:
        [java] Begin TopicSendRecvClient, now=1102809427043
  @@ -11230,7 +11192,7 @@
                       shown in <xref linkend="ch6.jmspubclient.ex"/>.</para>
                   <example id="ch6.jmspubclient.ex">
                       <title>A JMS publisher client</title>
  -                    <programlisting>package org.jboss.chap6.ex1;
  +                    <programlisting>package org.jboss.book.jms.ex1;
   
   import javax.jms.JMSException;
   import javax.jms.Message;
  @@ -11249,7 +11211,7 @@
    *  A JMS client example program that sends a TextMessage to a Topic
    *    
    *  @author Scott.Stark at jboss.org
  - *  @version $Revision: 1.1 $
  + *  @version $Revision: 1.2 $
    */
   public class TopicSendClient
   {
  @@ -11309,7 +11271,7 @@
                   </example>
                   <example id="ch6.jmssubclient.ex">
                       <title>A JMS subscriber client</title>
  -                    <programlisting>package org.jboss.chap6.ex1;
  +                    <programlisting>package org.jboss.book.jms.ex1;
   
   import javax.jms.JMSException;
   import javax.jms.Message;
  @@ -11328,7 +11290,7 @@
    * A JMS client example program that synchronously receives a message a Topic
    *  
    * @author Scott.Stark at jboss.org
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */
   public class TopicRecvClient
   {
  @@ -11390,7 +11352,7 @@
                   </example>
                   <para>Run the <literal>TopicSendClient</literal> followed by the <literal>TopicRecvClient</literal> as
                       follows:</para>
  -                <programlisting>[examples]$ ant -Dchap=chap6 -Dex=1ps2 run-example
  +                <programlisting>[examples]$ ant -Dchap=jms -Dex=1ps2 run-example
   ...
   run-example1ps2:
        [java] Begin TopicSendClient, now=1102810007899
  @@ -11416,7 +11378,7 @@
                       the <xref linkend="ch6.jmssubclient.ex"/> client highlighted in bold.</para>
                   <example id="ch6.durabletopic.ex">
                       <title>A durable topic JMS client example</title>
  -                    <programlisting>package org.jboss.chap6.ex1;
  +                    <programlisting>package org.jboss.book.jms.ex1;
   
   import javax.jms.JMSException;
   import javax.jms.Message;
  @@ -11435,7 +11397,7 @@
    *  A JMS client example program that synchronously receives a message a Topic
    *     
    *  @author Scott.Stark at jboss.org
  - *  @version $Revision: 1.1 $
  + *  @version $Revision: 1.2 $
    */
   public class DurableTopicRecvClient
   {
  @@ -11465,7 +11427,7 @@
           // Setup the pub/sub connection, session
           setupPubSub();
           // Wait upto 5 seconds for the message
  -        TopicSubscriber recv = session.createDurableSubscriber(topic, "chap6-ex1dtps");
  +        TopicSubscriber recv = session.createDurableSubscriber(topic, "jms-ex1dtps");
           Message msg = recv.receive(5000);
           if (msg == null) {
               System.out.println("Timed out waiting for msg");
  @@ -11497,7 +11459,7 @@
   }</programlisting>
                   </example>
                   <para>Now run the previous topic publisher with the durable topic subscriber as follows:</para>
  -                <programlisting>[examples]$ ant -Dchap=chap6 -Dex=1psdt run-example
  +                <programlisting>[examples]$ ant -Dchap=jms -Dex=1psdt run-example
   ...                
   run-example1psdt:
        [java] Begin DurableTopicSetup
  @@ -11512,7 +11474,7 @@
        [java] DurableTopicRecvClient.recv, msgt=SpyTextMessage {
        [java] Header { 
        [java]    jmsDestination  : TOPIC.testTopic.DurableSubscription[
  -               clientId=DurableSubscriberExample name=chap6-ex1dtps selector=null]
  +               clientId=DurableSubscriberExample name=jms-ex1dtps selector=null]
        [java]    jmsDeliveryMode : 2
        [java]    jmsExpiration   : 0
        [java]    jmsPriority     : 4
  @@ -11543,7 +11505,7 @@
                               the details of durable topic setup in the configuration section.</para>
                       </listitem>
                       <listitem>
  -                        <para>An <literal>org.jboss.chap6.DurableTopicSetup</literal> client was run prior to the
  +                        <para>An <literal>org.jboss.book.jms.DurableTopicSetup</literal> client was run prior to the
                                   <literal>TopicSendClient</literal>. The reason for this is a durable topic subscriber
                               must have registered a subscription at some point in the past in order for the messaging
                               server to save messages. JBoss supports dynamic durable topic subscribers and the
  @@ -11571,7 +11533,7 @@
                       found in the incoming message <literal>JMSReplyTo</literal> header.</para>
                   <example id="ch6.textmessage.ex">
                       <title>A TextMessage processing MDB</title>
  -                    <programlisting>package org.jboss.chap6.ex2;
  +                    <programlisting>package org.jboss.book.jms.ex2;
                   
   import javax.ejb.MessageDrivenBean;
   import javax.ejb.MessageDrivenContext;
  @@ -11594,7 +11556,7 @@
    * JMSReplyTo header.
    * 
    * @author Scott.Stark at jboss.org
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */
   public class TextMDB 
       implements MessageDrivenBean, MessageListener
  @@ -11690,7 +11652,7 @@
       &lt;enterprise-beans&gt;
           &lt;message-driven&gt;
               &lt;ejb-name&gt;TextMDB&lt;/ejb-name&gt;
  -            &lt;ejb-class&gt;org.jboss.chap6.ex2.TextMDB&lt;/ejb-class&gt;
  +            &lt;ejb-class&gt;org.jboss.book.jms.ex2.TextMDB&lt;/ejb-class&gt;
               &lt;transaction-type&gt;Container&lt;/transaction-type&gt;
               &lt;acknowledge-mode&gt;AUTO_ACKNOWLEDGE&lt;/acknowledge-mode&gt;
               &lt;message-driven-destination&gt;
  @@ -11728,7 +11690,7 @@
                       modified by <literal>TextMDB</literal> from queue <literal>A</literal>.</para>
                   <example id="ch6.textmdbclient.ex">
                       <title>A JMS client that interacts with the TextMDB</title>
  -                    <programlisting>package org.jboss.chap6.ex2;
  +                    <programlisting>package org.jboss.book.jms.ex2;
   
   import javax.jms.JMSException;
   import javax.jms.Message;
  @@ -11751,7 +11713,7 @@
    *  TextMDB from Queue A.
    *
    *  @author Scott.Stark at jboss.org
  - *  @version $Revision: 1.1 $
  + *  @version $Revision: 1.2 $
    */
   public class SendRecvClient
   {
  @@ -11840,11 +11802,10 @@
   }</programlisting>
                   </example>
                   <para>Run the client as follows:</para>
  -                <programlisting>[examples]$ ant -Dchap=chap6 -Dex=2 run-example
  +                <programlisting>[examples]$ ant -Dchap=jms -Dex=2 run-example
   ...
   run-example2:
  -     [copy] Copying 1 file to /tmp/jboss-4.0.2/server/default/deploy
  -     [echo] Waiting 5 seconds for deploy...
  +...
        [java] Begin SendRecvClient, now=1102900541558
        [java] Begin sendRecvAsync
        [java] sendRecvAsync, sent text=A text msg#0
  @@ -11870,8 +11831,8 @@
        [java] onMessage, recv text=A text msg#6processed by: 15679078</programlisting>
                   <para>The corresponding JBoss server console output is:</para>
                   <programlisting>19:15:40,232 INFO  [EjbModule] Deploying TextMDB
  -19:15:41,498 INFO  [EJBDeployer] Deployed: file:/private/tmp/jboss-4.0.2/server/default/deplo
  -y/chap6-ex2.jar
  +19:15:41,498 INFO  [EJBDeployer] Deployed: file:/jboss-4.0.5.GA/server/default/deploy/
  +  jms-ex2.jar
   19:15:45,606 INFO  [TextMDB] TextMDB.ctor, this=10775981
   19:15:45,620 INFO  [TextMDB] TextMDB.ctor, this=1792333
   19:15:45,627 INFO  [TextMDB] TextMDB.setMessageDrivenContext, this=10775981
  @@ -13731,7 +13692,7 @@
                       to see how JBoss interacts with the adaptor.</para>
                   <para>The adaptor we will create could be used as the starting point for a non-transacted file system
                       adaptor. The source to the example adaptor can be found in the
  -                    <literal>src/main/org/jboss/chap7/ex1</literal> directory of the book examples. A class diagram that
  +                    <literal>src/main/org/jboss/book/jca/ex1</literal> directory of the book examples. A class diagram that
                       shows the mapping from the required <literal>javax.resource.spi</literal> interfaces to the resource
                       adaptor implementation is given in <xref linkend="ch7.fsrar.fig"/>.</para>
                   <figure id="ch7.fsrar.fig">
  @@ -13748,8 +13709,8 @@
                       adaptor to help you better understand the components in the JCA system level contract.</para>
                   <para>To build the example and deploy the RAR to the JBoss server <literal>deploy/lib</literal>
                       directory, execute the following Ant command in the book examples directory.</para>
  -                <programlisting>[examples]$ ant -Dchap=chap7 build-chap</programlisting>
  -                <para>The deployed files include a <literal>chap7-ex1.sar</literal> and a
  +                <programlisting>[examples]$ ant -Dchap=jca build-chap</programlisting>
  +                <para>The deployed files include a <literal>jca-ex1.sar</literal> and a
                       <literal>notxfs-service.xml</literal> service descriptor. The example resource adaptor deployment
                       descriptor is shown in <xref linkend="ch7.notxfsrardd.ex"/>.</para>
                   <example id="ch7.notxfsrardd.ex">
  @@ -13774,7 +13735,7 @@
           &lt;outbound-resourceadapter&gt;
               &lt;connection-definition&gt;
                   <emphasis role="bold">&lt;managedconnectionfactory-class&gt;
  -                    org.jboss.chap7.ex1.ra.FSManagedConnectionFactory
  +                    org.jboss.book.jca.ex1.ra.FSManagedConnectionFactory
                   &lt;/managedconnectionfactory-class&gt;</emphasis>
                   &lt;config-property&gt;
                       &lt;config-property-name&gt;FileSystemRootDir&lt;/config-property-name&gt;
  @@ -13792,16 +13753,16 @@
                       &lt;config-property-value/&gt;
                   &lt;/config-property&gt;
                   <emphasis role="bold">&lt;connectionfactory-interface&gt;
  -                    org.jboss.chap7.ex1.ra.DirContextFactory
  +                    org.jboss.book.jca.ex1.ra.DirContextFactory
                   &lt;/connectionfactory-interface&gt;
                   &lt;connectionfactory-impl-class&gt;
  -                    org.jboss.chap7.ex1.ra.DirContextFactoryImpl
  +                    org.jboss.book.jca.ex1.ra.DirContextFactoryImpl
                   &lt;/connectionfactory-impl-class&gt;
                   &lt;connection-interface&gt;
                       javax.naming.directory.DirContext
                   &lt;/connection-interface&gt;
                   &lt;connection-impl-class&gt;
  -                    org.jboss.chap7.ex1.ra.FSDirContext 
  +                    org.jboss.book.jca.ex1.ra.FSDirContext 
                   &lt;/connection-impl-class&gt;</emphasis>
               &lt;/connection-definition&gt;
               &lt;transaction-support&gt;NoTransaction&lt;/transaction-support&gt;
  @@ -13830,7 +13791,7 @@
                           <para>
                               <emphasis role="bold">managedconnectionfactory-class</emphasis>: The implementation of the
                                   <literal>ManagedConnectionFactory</literal> interface,
  -                                <literal>org.jboss.chap7.ex1.ra.FSManagedConnectionFactory</literal>
  +                                <literal>org.jboss.book.jca.ex1.ra.FSManagedConnectionFactory</literal>
                           </para>
                       </listitem>
                       <listitem>
  @@ -13838,14 +13799,14 @@
                               <emphasis role="bold">connectionfactory-interface</emphasis>: This is the interface that
                               clients will obtain when they lookup the connection factory instance from JNDI, here a
                               proprietary resource adaptor value,
  -                            <literal>org.jboss.chap7.ex1.ra.DirContextFactory</literal>. This value will be needed when
  +                            <literal>org.jboss.book.jca.ex1.ra.DirContextFactory</literal>. This value will be needed when
                               we create the JBoss <literal>ds.xml</literal> to use the resource. </para>
                       </listitem>
                       <listitem>
                           <para>
                               <emphasis role="bold">connectionfactory-impl-class</emphasis>: This is the class that
                               provides the implementation of the <literal>connectionfactory-interface</literal>,
  -                                <literal>org.jboss.chap7.ex1.ra.DirContextFactoryImpl</literal>. </para>
  +                                <literal>org.jboss.book.jca.ex1.ra.DirContextFactoryImpl</literal>. </para>
                       </listitem>
                       <listitem>
                           <para>
  @@ -13857,7 +13818,7 @@
                           <para>
                               <emphasis role="bold">connection-impl-class</emphasis>: This is he class that provides the
                                   <literal>connection-interface</literal> implementation,
  -                                <literal>org.jboss.chap7.ex1.ra.FSDirContext</literal>. </para>
  +                                <literal>org.jboss.book.jca.ex1.ra.FSDirContext</literal>. </para>
                       </listitem>
                       <listitem>
                           <para>
  @@ -13881,9 +13842,9 @@
   &lt;connection-factories&gt;
       &lt;no-tx-connection-factory&gt;
           &lt;jndi-name&gt;NoTransFS&lt;/jndi-name&gt;
  -        &lt;rar-name&gt;chap7-ex1.rar&lt;/rar-name&gt;
  +        &lt;rar-name&gt;jca-ex1.rar&lt;/rar-name&gt;
           &lt;connection-definition&gt;
  -             org.jboss.chap7.ex1.ra.DirContextFactory
  +             org.jboss.book.jca.ex1.ra.DirContextFactory
           &lt;/connection-definition&gt;
           &lt;config-property name=&quot;FileSystemRootDir&quot;
                            type=&quot;java.lang.String&quot;&gt;/tmp/db/fs_store&lt;/config-property&gt;
  @@ -13903,14 +13864,14 @@
                               <emphasis role="bold">rar-name</emphasis>: This is the name of the RAR file that contains
                               the definition for the resource we want to provide. For nested RAR files, the name would
                               look like <literal>myapplication.ear#my.rar</literal>. In this example, it is simply
  -                                <literal>chap7-ex1.rar</literal>. </para>
  +                                <literal>jca-ex1.rar</literal>. </para>
                       </listitem>
                       <listitem>
                           <para>
                               <emphasis role="bold">connection-definition</emphasis>: This is the connection factory
                               interface class. It should match the <literal>connectionfactory-interface</literal> in the
                                   <literal>ra.xml</literal> file. Here our connection factory interface is
  -                                <literal>org.jboss.chap7.ex1.ra.DirContextFactory</literal>. </para>
  +                                <literal>org.jboss.book.jca.ex1.ra.DirContextFactory</literal>. </para>
                       </listitem>
                       <listitem>
                           <para>
  @@ -13921,7 +13882,7 @@
                       </listitem>
                   </itemizedlist>
                   <para>To deploy the RAR and connection manager configuration to the JBoss server, run the following:</para>
  -                <programlisting>[examples]$ ant -Dchap=chap7 config</programlisting>
  +                <programlisting>[examples]$ ant -Dchap=jca config</programlisting>
                   <para>The server console will display some logging output indicating that the resource adaptor has been
                       deployed. </para>
                   <para>Now we want to test access of the resource adaptor by a J2EE component. To do this we have created
  @@ -13962,7 +13923,7 @@
                       implementation since this is a non-transactional resource.</para>
                   <para>Run the test client which calls the <literal>EchoBean.echo</literal> method by running Ant as
                       follows from the examples directory:</para>
  -                <programlisting>[examples]$ ant -Dchap=chap7 -Dex=1 run-example</programlisting>
  +                <programlisting>[examples]$ ant -Dchap=jca -Dex=1 run-example</programlisting>
                   <para>You'll see some output from the bean in the system console, but much more detailed logging output
                       can be found in the <literal>server/default/log/server.log</literal> file. Don't worry if you see
                       exceptions. They are just stack traces to highlight the call path into parts of the adaptor. To help
  @@ -15561,11 +15522,11 @@
                           <literal>FourLetterEchoInvoker</literal> role because the security context is the method
                       argument, not a property of the caller. The code for the custom <literal>SecurityProxy</literal> is
                       given in <xref linkend="ch8.echo1.ex"/>, and the full source code is available in the
  -                        <literal>src/main/org/jboss/chap8/ex1</literal> directory of the book examples.</para>
  +                        <literal>src/main/org/jboss/book/security/ex1</literal> directory of the book examples.</para>
                   <example id="ch8.echo1.ex">
                       <title>The example 1 custom EchoSecurityProxy implementation that enforces the echo argument-based
                           security constraint.</title>
  -                    <programlisting>package org.jboss.chap8.ex1;
  +                    <programlisting>package org.jboss.book.security.ex1;
                   
   import java.lang.reflect.Method;
   import javax.ejb.EJBContext;
  @@ -15577,7 +15538,7 @@
   /** A simple example of a custom SecurityProxy implementation
    *  that demonstrates method argument based security checks.
    * @author Scott.Stark at jboss.org
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */
   public class EchoSecurityProxy implements SecurityProxy
   {
  @@ -15652,7 +15613,7 @@
       &lt;enterprise-beans&gt;
           &lt;session&gt;
               &lt;ejb-name&gt;EchoBean&lt;/ejb-name&gt;
  -            &lt;security-proxy&gt;org.jboss.chap8.ex1.EchoSecurityProxy&lt;/security-proxy&gt;
  +            &lt;security-proxy&gt;org.jboss.book.security.ex1.EchoSecurityProxy&lt;/security-proxy&gt;
           &lt;/session&gt;
       &lt;/enterprise-beans&gt;
   &lt;/jboss&gt; </programlisting>
  @@ -15681,21 +15642,17 @@
                   <para>The first call should succeed, while the second should fail due to the fact that
                       <literal>Four</literal> is a four-letter word. Run the client as follows using Ant from the examples
                       directory:</para>
  -                <programlisting>[examples]$ ant -Dchap=chap8 -Dex=1 run-example
  +                <programlisting>[examples]$ ant -Dchap=security -Dex=1 run-example
   run-example1:
  -     [copy] Copying 1 file to /tmp/jboss-4.0.1/server/default/deploy
  +...
        [echo] Waiting for 5 seconds for deploy...
        [java] [INFO,ExClient] Looking up EchoBean
        [java] [INFO,ExClient] Created Echo
        [java] [INFO,ExClient] Echo.echo('Hello') = Hello
  -     [java] Exception in thread "main" java.rmi.ServerException: RemoteException occurred in 
  -            server thread; nested exception is: 
  -     [java]     java.rmi.AccessException: SecurityException; nested exception is: 
  +     [java] Exception in thread "main" java.rmi.AccessException: SecurityException; nested exception is: 
        [java]     java.lang.SecurityException: No 4 letter words
   ...
  -     [java]     at org.jboss.chap8.ex1.ExClient.main(ExClient.java:25)
  -     [java] Caused by: java.rmi.AccessException: SecurityException; nested exception is: 
  -     [java]     java.lang.SecurityException: No 4 letter words
  +     [java] Caused by: java.lang.SecurityException: No 4 letter words
   ...</programlisting>
                   <para>The result is that the <literal>echo('Hello')</literal> method call succeeds as expected and the
                           <literal>echo('Four')</literal> method call results in a rather messy looking exception, which
  @@ -16256,7 +16213,7 @@
                   <para>The MBean also supports the following operations that allow one to dynamically extend the login
                       configurations at runtime. Note that any operation that attempts to alter login configuration
                       requires a <literal>javax.security.auth.AuthPermission("refreshLoginConfiguration")</literal> when
  -                    running with a security manager. The <literal>org.jboss.chap8.service.SecurityConfig</literal>
  +                    running with a security manager. The <literal>org.jboss.book.security.service.SecurityConfig</literal>
                       service demonstrates how this can be used to add/remove a deployment specific security configuration
                       dynamically.</para>
                   <itemizedlist>
  @@ -17538,7 +17495,7 @@
                           a lookup of the form <literal>roles/&lt;username&gt;</literal> returns the requested
                           user's roles.</para>
                       <para>The source code for the example is located in the
  -                        <literal>src/main/org/jboss/chap8/ex2</literal> directory of the book examples. <xref
  +                        <literal>src/main/org/jboss/book/security/ex2</literal> directory of the book examples. <xref
                               linkend="ch8.jndiuser.ex"/> shows the source code for the <literal>JndiUserAndPass</literal>
                           custom login module. Note that because this extends the JBoss
                               <literal>UsernamePasswordLoginModule</literal>, all the <literal>JndiUserAndPass</literal>
  @@ -17547,7 +17504,7 @@
                           <literal>LoginModule</literal> operations.</para>
                       <example id="ch8.jndiuser.ex">
                           <title> A JndiUserAndPass custom login module</title>
  -                        <programlisting>package org.jboss.chap8.ex2;
  +                        <programlisting>package org.jboss.book.security.ex2;
                       
   import java.security.acl.Group;
   import java.util.Map;
  @@ -17566,7 +17523,7 @@
    *  for a user from a JNDI lookup.
    *     
    *  @author Scott.Stark at jboss.org
  - *  @version $Revision: 1.1 $
  + *  @version $Revision: 1.2 $
   */
   public class JndiUserAndPass 
       extends UsernamePasswordLoginModule
  @@ -17636,7 +17593,7 @@
   }</programlisting>
                       </example>
                       <para>The details of the JNDI store are found in the
  -                        <literal>org.jboss.chap8.ex2.service.JndiStore</literal> MBean. This service binds an
  +                        <literal>org.jboss.book.security.ex2.service.JndiStore</literal> MBean. This service binds an
                               <literal>ObjectFactory</literal> that returns a <literal>javax.naming.Context</literal>
                           proxy into JNDI. The proxy handles lookup operations done against it by checking the prefix of
                           the lookup name against <literal>password</literal> and <literal>roles</literal>. When the name
  @@ -17647,35 +17604,28 @@
                           can experiment with other implementations as you wish.</para>
                       <para>The example code includes a simple session bean for testing the custom login module. To build,
                           deploy and run the example, execute the following command in the examples directory.</para>
  -                    <programlisting>[examples]$ ant -Dchap=chap8 -Dex=2 run-example
  +                    <programlisting>[examples]$ ant -Dchap=security -Dex=2 run-example
   ...
   run-example2:
  -     [copy] Copying 1 file to /tmp/jboss-4.0.1/server/default/deploy
        [echo] Waiting for 5 seconds for deploy...
        [java] [INFO,ExClient] Login with username=jduke, password=theduke
        [java] [INFO,ExClient] Looking up EchoBean2
        [java] [INFO,ExClient] Created Echo
        [java] [INFO,ExClient] Echo.echo('Hello') = Hello</programlisting>
  -                    <programlisting>19:06:13,266 INFO  [EjbModule] Deploying EchoBean2
  -19:06:13,482 INFO  [JndiStore] Start, bound security/store
  -19:06:13,486 INFO  [SecurityConfig] Using JAAS AuthConfig: jar:file:/private/tmp/jboss-4.0.1/
  -server/default/tmp/deploy/tmp23012chap8-ex2.jar-contents/chap8-ex2.sar!/META-INF/login-config
  -.xml
  -19:06:13,654 INFO  [EJBDeployer] Deployed: file:/private/tmp/jboss-4.0.1/server/default/deplo
  -y/chap8-ex2.jar</programlisting>
  +
                       <para>The choice of using the <literal>JndiUserAndPass</literal> custom login module for the server
                           side authentication of the user is determined by the login configuration for the example
                           security domain. The EJB JAR <literal>META-INF/jboss.xml</literal> descriptor sets the security
                           domain </para>
                       <programlisting>&lt;?xml version="1.0"?&gt;
   &lt;jboss&gt;
  -    &lt;security-domain&gt;java:/jaas/chap8-ex2&lt;/security-domain&gt;
  +    &lt;security-domain&gt;java:/jaas/security-ex2&lt;/security-domain&gt;
   &lt;/jboss&gt;</programlisting>
                       <para>The SAR <literal>META-INF/login-config.xml</literal> descriptor defines the login module
                           configuration.</para>
  -                    <programlisting>&lt;application-policy name = "chap8-ex2"&gt;
  +                    <programlisting>&lt;application-policy name = "security-ex2"&gt;
       &lt;authentication&gt;
  -        &lt;login-module code="org.jboss.chap8.ex2.JndiUserAndPass"
  +        &lt;login-module code="org.jboss.book.security.ex2.JndiUserAndPass"
                         flag="required"&gt;
               &lt;module-option name = "userPathPrefix"&gt;/security/store/password&lt;/module-option&gt;
               &lt;module-option name = "rolesPathPrefix"&gt;/security/store/roles&lt;/module-option&gt;
  @@ -18178,41 +18128,32 @@
                           the <literal>SRPVerifierStore</literal> interface that uses an in memory store that is seeded
                           from a Java properties file rather than a serialized object store as used by the
                               <literal>SRPVerifierStoreService</literal>. This custom service is
  -                            <literal>org.jboss.chap8.ex3.service.PropertiesVerifierStore</literal>. The following shows
  +                            <literal>org.jboss.book.security.ex3.service.PropertiesVerifierStore</literal>. The following shows
                           the contents of the JAR that contains the example EJB and SRP services.</para>
  -                    <programlisting>[examples]$ java -cp output/classes ListJar output/chap8/chap8-ex3.jar
  -output/chap8/chap8-ex3.jar
  -+- META-INF/MANIFEST.MF
  -+- META-INF/ejb-jar.xml
  -+- META-INF/jboss.xml
  -+- org/jboss/chap8/ex3/Echo.class
  -+- org/jboss/chap8/ex3/EchoBean.class
  -+- org/jboss/chap8/ex3/EchoHome.class
  -+- roles.properties
  -+- users.properties
  -+- chap8-ex3.sar (archive)
  -| +- META-INF/MANIFEST.MF
  -| +- META-INF/jboss-service.xml
  -| +- META-INF/login-config.xml
  -| +- org/jboss/chap8/ex3/service/PropertiesVerifierStore$1.class
  -| +- org/jboss/chap8/ex3/service/PropertiesVerifierStore.class
  -| +- org/jboss/chap8/ex3/service/PropertiesVerifierStoreMBean.class
  -| +- org/jboss/chap8/service/SecurityConfig.class
  -| +- org/jboss/chap8/service/SecurityConfigMBean.class</programlisting>
  +                    <programlisting>[examples]$ jar tf output/security/security-ex3.jar 
  +META-INF/MANIFEST.MF
  +META-INF/ejb-jar.xml
  +META-INF/jboss.xml
  +org/jboss/book/security/ex3/Echo.class
  +org/jboss/book/security/ex3/EchoBean.class
  +org/jboss/book/security/ex3/EchoHome.class
  +roles.properties
  +users.properties
  +security-ex3.sar</programlisting>
                       <para>The key SRP related items in this example are the SRP MBean services configuration, and the
                           SRP login module configurations. The <literal>jboss-service.xml</literal> descriptor of the
  -                            <literal>chap8-ex3.sar</literal> is given in <xref linkend="ch8.ex3servicexml.ex"/>, while
  +                            <literal>security-ex3.sar</literal> is given in <xref linkend="ch8.ex3servicexml.ex"/>, while
                               <xref linkend="ch8.srpclientconf.ex"/> and <xref linkend="ch8.srpserverconf.ex"/> give the
                           example client side and server side login module configurations.</para>
                       <example id="ch8.ex3servicexml.ex">
  -                        <title>The chap8-ex3.sar jboss-service.xml descriptor for the SRP services</title>
  +                        <title>The security-ex3.sar jboss-service.xml descriptor for the SRP services</title>
                           <programlisting>&lt;server&gt;
       &lt;!-- The custom JAAS login configuration that installs
            a Configuration capable of dynamically updating the
            config settings --&gt;
   
  -    &lt;mbean code="org.jboss.chap8.service.SecurityConfig" 
  -           name="jboss.docs.chap8:service=LoginConfig-EX3"&gt;
  +    &lt;mbean code="org.jboss.book.security.service.SecurityConfig" 
  +           name="jboss.docs.security:service=LoginConfig-EX3"&gt;
           &lt;attribute name="AuthConfig"&gt;META-INF/login-config.xml&lt;/attribute&gt;
           &lt;attribute name="SecurityConfigName"&gt;jboss.security:name=SecurityConfig&lt;/attribute&gt;
       &lt;/mbean&gt;
  @@ -18220,19 +18161,19 @@
       &lt;!-- The SRP service that provides the SRP RMI server and server side
            authentication cache --&gt;
       &lt;mbean code="org.jboss.security.srp.SRPService" 
  -           name="jboss.docs.chap8:service=SRPService"&gt;
  -        &lt;attribute name="VerifierSourceJndiName"&gt;srp-test/chap8-ex3&lt;/attribute&gt;
  +           name="jboss.docs.security:service=SRPService"&gt;
  +        &lt;attribute name="VerifierSourceJndiName"&gt;srp-test/security-ex3&lt;/attribute&gt;
           &lt;attribute name="JndiName"&gt;srp-test/SRPServerInterface&lt;/attribute&gt;
           &lt;attribute name="AuthenticationCacheJndiName"&gt;srp-test/AuthenticationCache&lt;/attribute&gt;
           &lt;attribute name="ServerPort"&gt;0&lt;/attribute&gt;
  -        &lt;depends&gt;jboss.docs.chap8:service=PropertiesVerifierStore&lt;/depends&gt;
  +        &lt;depends&gt;jboss.docs.security:service=PropertiesVerifierStore&lt;/depends&gt;
       &lt;/mbean&gt;
   
       &lt;!-- The SRP store handler service that provides the user password verifier
            information --&gt;
  -    &lt;mbean code="org.jboss.chap8.ex3.service.PropertiesVerifierStore"
  -           name="jboss.docs.chap8:service=PropertiesVerifierStore"&gt;
  -        &lt;attribute name="JndiName"&gt;srp-test/chap8-ex3&lt;/attribute&gt;
  +    &lt;mbean code="org.jboss.security.ex3.service.PropertiesVerifierStore"
  +           name="jboss.docs.security:service=PropertiesVerifierStore"&gt;
  +        &lt;attribute name="JndiName"&gt;srp-test/security-ex3&lt;/attribute&gt;
       &lt;/mbean&gt;
   &lt;/server&gt;</programlisting>
                       </example>
  @@ -18250,7 +18191,7 @@
                       </example>
                       <example id="ch8.srpserverconf.ex">
                           <title>The server side XMLLoginConfig configuration</title>
  -                        <programlisting>&lt;application-policy name="chap8-ex3"&gt;
  +                        <programlisting>&lt;application-policy name="security-ex3"&gt;
       &lt;authentication&gt;
           &lt;login-module code="org.jboss.security.srp.jaas.SRPCacheLoginModule"
                         flag = "required"&gt;
  @@ -18296,10 +18237,9 @@
                           <literal>roles.properties</literal> file included in the EJB JAR.</para>
                       <para>Now, run the example 3 client by executing the following command from the book examples
                           directory:</para>
  -                    <programlisting>[examples]$ ant -Dchap=chap8 -Dex=3 run-example
  +                    <programlisting>[examples]$ ant -Dchap=security -Dex=3 run-example
   ...
   run-example3:
  -     [copy] Copying 1 file to /tmp/jboss-4.0.1/server/default/deploy
        [echo] Waiting for 5 seconds for deploy...
        [java] Logging in using the 'srp' configuration
        [java] Created Echo
  @@ -18438,10 +18378,10 @@
               <para>JBoss uses JSEE, the Java Secure Socket Extension (JSSE), for SSL. JSSE is bundled with JDK 1.4. To
                   get started with JSSE you need a public key/private key pair in the form of an X509 certificate for use
                   by the SSL server sockets. For the purpose of this example we have created a self-signed certificate
  -                using the JDK keytool and included the resulting keystore file in the chap8 source directory as
  -                    <literal>chap8.keystore</literal>. It was created using the following command and input:</para>
  -            <programlisting> keytool -genkey -keystore chap8.keystore -storepass rmi+ssl -keypass rmi+ssl -keyalg RSA -alias chapter8 -validity 3650 -dname "cn=chapter8 example,ou=admin book,dc=jboss,dc=org"</programlisting>
  -            <para>This produces a keystore file called <literal>chap8.keystore</literal>. A keystore is a database of
  +                using the JDK keytool and included the resulting keystore file, 
  +                    <literal>example.keystore</literal>. It was created using the following command and input:</para>
  +            <programlisting> keytool -genkey -keystore example.keystore -storepass rmi+ssl -keypass rmi+ssl -keyalg RSA -alias example -validity 3650 -dname "cn=example,ou=admin book,dc=jboss,dc=org"</programlisting>
  +            <para>This produces a keystore file called <literal>example.keystore</literal>. A keystore is a database of
                   security keys. There are two different types of entries in a keystore:</para>
               <itemizedlist>
                   <listitem>
  @@ -18462,9 +18402,9 @@
                           this, by signing the certificate.</para>
                   </listitem>
               </itemizedlist>
  -            <para>Listing the <literal>src/main/org/jboss/chap8/chap8.keystore</literal> examples file contents using
  +            <para>Listing the <literal>src/main/org/jboss/book/security/example.keystore</literal> examples file contents using
                   the keytool shows one self-signed certificate:</para>
  -            <programlisting>[examples]$ keytool -list -v -keystore src/main/org/jboss/chap8/chap8.keystore
  +            <programlisting>[examples]$ keytool -list -v -keystore src/main/org/jboss/book/security/example.keystore
   Enter keystore password:  rmi+ssl
   
   Keystore type: jks
  @@ -18472,18 +18412,18 @@
   
   Your keystore contains 1 entry
   
  -Alias name: chapter8
  -Creation date: Dec 16, 2004
  +Alias name: example
  +Creation date: Oct 31, 2006
   Entry type: keyEntry
   Certificate chain length: 1
   Certificate[1]:
  -Owner: CN=chapter8 example, OU=admin book, DC=jboss, DC=org
  -Issuer: CN=chapter8 example, OU=admin book, DC=jboss, DC=org
  -Serial number: 41c23d6c
  -Valid from: Thu Dec 16 19:59:08 CST 2004 until: Sun Dec 14 19:59:08 CST 2014
  +Owner: CN=example, OU=admin book, DC=jboss, DC=org
  +Issuer: CN=example, OU=admin book, DC=jboss, DC=org
  +Serial number: 45481c1b
  +Valid from: Tue Oct 31 22:01:31 CST 2006 until: Fri Oct 28 23:01:31 CDT 2016
   Certificate fingerprints:
  -         MD5:  36:29:FD:1C:78:44:14:5E:5A:C7:EB:E5:E8:ED:06:86
  -         SHA1: 37:FE:BB:8A:A5:CF:D9:3D:B9:61:8C:53:CE:19:1E:4D:BC:C9:18:F2
  +         MD5:  C2:CA:CA:D3:00:71:3E:32:CB:B3:C8:A8:4E:68:9A:BB
  +         SHA1: A6:44:EF:66:2A:49:14:B0:A4:14:74:8B:64:61:E4:E6:AF:E3:70:41
   
   
   *******************************************
  @@ -18499,7 +18439,7 @@
                   steps to enable the use of SSL for RMI access to EJBs. The first is to enable the use of a keystore as
                   the database for the SSL server certificate, which is done by configuring an
                       <literal>org.jboss.security.plugins.JaasSecurityDomain</literal> MBean. The
  -                    <literal>jboss-service.xml</literal> descriptor in the <literal>chap8/ex4</literal> directory
  +                    <literal>jboss-service.xml</literal> descriptor in the <literal>book/security/ex4</literal> directory
                   includes the <literal>JaasSecurityDomain</literal> definition shown in <xref linkend="ch8.rmissl.ex"/>.</para>
               <example id="ch8.rmissl.ex">
                   <title>A sample JaasSecurityDomain config for RMI/SSL</title>
  @@ -18509,7 +18449,7 @@
       &lt;constructor&gt;
           &lt;arg type="java.lang.String" value="RMI+SSL"/&gt;
       &lt;/constructor&gt;
  -    &lt;attribute name="KeyStoreURL"&gt;chap8.keystore&lt;/attribute&gt;
  +    &lt;attribute name="KeyStoreURL"&gt;example.keystore&lt;/attribute&gt;
       &lt;attribute name="KeyStorePass"&gt;rmi+ssl&lt;/attribute&gt;
   &lt;/mbean&gt; </programlisting>
               </example>
  @@ -18517,7 +18457,7 @@
                   <literal>JaasSecurityManager</literal> class that adds the notions of a keystore as well JSSE
                       <literal>KeyManagerFactory</literal> and <literal>TrustManagerFactory</literal> access. It extends
                   the basic security manager to allow support for SSL and other cryptographic operations that require
  -                security keys. This configuration simply loads the chap8.keystore from the example 4 MBean SAR using the
  +                security keys. This configuration simply loads the example.keystore from the example 4 MBean SAR using the
                   indicated password.</para>
               <para>The second step is to define an EJB invoker configuration that uses the JBossSX RMI socket factories
                   that support SSL. To do this you need to define a custom configuration for the
  @@ -18581,16 +18521,14 @@
           &lt;/invoker-proxy-binding&gt;
       &lt;/invoker-proxy-bindings&gt;
   &lt;/jboss&gt;</programlisting>
  -            <para>The example 4 code is located under the <literal>src/main/org/jboss/chap8/ex4</literal> directory of
  +            <para>The example 4 code is located under the <literal>src/main/org/jboss/book/security/ex4</literal> directory of
                   the book examples. This is another simple stateless session bean with an echo method that returns its
                   input argument. It is hard to tell when SSL is in use unless it fails, so we'll run the example 4 client
                   in two different ways to demonstrate that the EJB deployment is in fact using SSL. Start the JBoss
                   server using the default configuration and then run example 4b as follows:</para>
  -            <programlisting>[examples]$ ant -Dchap=chap8 -Dex=4b run-example
  +            <programlisting>[examples]$ ant -Dchap=security -Dex=4b run-example
   ...
   run-example4b:
  -     [copy] Copying 1 file to /tmp/jboss-4.0.1/server/default/deploy
  -     [echo] Waiting for 15 seconds for deploy...
   ...
        [java] Exception in thread "main" java.rmi.ConnectIOException: error during JRMP connect
   ion establishment; nested exception is: 
  @@ -18606,11 +18544,11 @@
                   certificate authorities. This is expected because the default certificate authority keystore that ships
                   with the JSSE package only includes well known certificate authorities such as VeriSign, Thawte, and RSA
                   Data Security. To get the EJB client to accept your self-signed certificate as valid, you need to tell
  -                the JSSE classes to use your <literal>chap8.keystore</literal> as its truststore. A truststore is just a
  +                the JSSE classes to use your <literal>example.keystore</literal> as its truststore. A truststore is just a
                   keystore that contains public key certificates used to sign other certificates. To do this, run example
                   4 using <literal>-Dex=4</literal> rather than <literal>-Dex=4b</literal> to pass the location of the
                   correct truststore using the <literal>javax.net.ssl.trustStore</literal> system property:</para>
  -            <programlisting>[examples]$ ant -Dchap=chap8 -Dex=4 run-example
  +            <programlisting>[examples]$ ant -Dchap=security -Dex=4 run-example
   ...
   run-example4:
        [copy] Copying 1 file to /tmp/jboss-4.0.1/server/default/deploy
  @@ -18634,7 +18572,7 @@
               <para>The problem is that the JBoss server has not finished deploying the example EJB in the time the client
                   allowed. This is due to the initial setup time of the secure random number generator used by the SSL
                   server socket. If you see this issue, simply rerun the example again or increase the deployment wait
  -                time in the chap8 <literal>build.xml</literal> Ant script.</para>
  +                time in the <literal>build-security.xml</literal> Ant script.</para>
           </section>
           <section>
               <title>Configuring JBoss for use Behind a Firewall</title>
  @@ -19338,7 +19276,7 @@
                       the sample configuration. Start by making two server configuration file sets called
                       <literal>jboss0</literal> and <literal>jboss1</literal> by running the following command from the
                       book examples directory:</para>
  -                <programlisting>[examples]$ ant -Dchap=chap10 -Dex=1 run-example</programlisting>
  +                <programlisting>[examples]$ ant -Dchap=misc -Dex=1 run-example</programlisting>
                   <para>This creates duplicates of the <literal>server/default</literal> configuration file sets as
                           <literal>server/jboss0</literal> and <literal>server/jboss1</literal>, and then replaces the
                           <literal>conf/jboss-service.xml</literal> descriptor with one that has the
  @@ -19346,7 +19284,7 @@
                   <programlisting>&lt;mbean code="org.jboss.services.binding.ServiceBindingManager"
          name="jboss.system:service=ServiceBindingManager"&gt;
       &lt;attribute name="ServerName"&gt;${jboss.server.name}&lt;/attribute&gt;
  -    &lt;attribute name="StoreURL"&gt;${jboss.server.base.dir}/chap10ex1-bindings.xml&lt;/attribute&gt;
  +    &lt;attribute name="StoreURL"&gt;${jboss.server.base.dir}/misc-ex1-bindings.xml&lt;/attribute&gt;
       &lt;attribute name="StoreFactoryClassName"&gt;
           org.jboss.services.binding.XMLServicesStoreFactory
       &lt;/attribute&gt;
  @@ -19356,7 +19294,7 @@
                           <literal>-c</literal> option. That will be either <literal>jboss0</literal> or
                       <literal>jboss1</literal>, depending on which configuration is being run. The binding manager will
                       find the corresponding server configuration section from the
  -                    <literal>chap10ex1-bindings.xml</literal> and apply the configured overrides. The
  +                    <literal>misc-ex1-bindings.xml</literal> and apply the configured overrides. The
                       <literal>jboss0</literal> configuration uses the default settings for the ports, while the
                           <literal>jboss1</literal> configuration adds 100 to each port number.</para>
                   <para>To test the sample configuration, start two JBoss instances using the <literal>jboss0</literal>
  @@ -19551,9 +19489,9 @@
                   <programlisting>&lt;server&gt;
                    
       &lt;mbean code="org.jboss.varia.scheduler.Scheduler"
  -           name="jboss.docs.chap10:service=Scheduler"&gt;
  +           name="jboss.docs:service=Scheduler"&gt;
           &lt;attribute name="StartAtStartup"&gt;true&lt;/attribute&gt;
  -        &lt;attribute name="SchedulableClass"&gt;org.jboss.chap10.ex2.ExSchedulable&lt;/attribute&gt;
  +        &lt;attribute name="SchedulableClass"&gt;org.jboss.book.misc.ex2.ExSchedulable&lt;/attribute&gt;
           &lt;attribute name="SchedulableArguments"&gt;TheName,123456789&lt;/attribute&gt;
           &lt;attribute name="SchedulableArgumentTypes"&gt;java.lang.String,long&lt;/attribute&gt;
                    
  @@ -19564,8 +19502,8 @@
                    
   &lt;/server&gt; </programlisting>
                   <para>The <literal>SchedulableClass</literal>
  -                    <literal>org.jboss.chap10.ex2.ExSchedulable</literal> example class is given below.</para>
  -                <programlisting>package org.jboss.chap10.ex2;
  +                    <literal>org.jboss.book.misc.ex2.ExSchedulable</literal> example class is given below.</para>
  +                <programlisting>package org.jboss.book.misc.ex2;
   
   import java.util.Date;
   import org.jboss.varia.scheduler.Schedulable;
  @@ -19575,7 +19513,7 @@
   /**
    * A simple Schedulable example.
    * @author Scott.Stark at jboss.org
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */
   public class ExSchedulable implements Schedulable
   {
  @@ -19599,7 +19537,7 @@
       }
   }</programlisting>
                   <para>Deploy the timer SAR by running:</para>
  -                <programlisting>[examples]$ ant -Dchap=chap10 -Dex=2 run-example</programlisting>
  +                <programlisting>[examples]$ ant -Dchap=misc -Dex=2 run-example</programlisting>
                   <para>The server console shows the following which includes the first two timer invocations, separated
                       by 60 seconds:</para>
                   <programlisting>21:09:27,716 INFO  [ExSchedulable] ctor, name: TheName, value: 123456789
  @@ -19824,7 +19762,7 @@
                   this because it prints out to the console starting and stopping messages, so we know when the service
                   gets activated/deactivated.</para>
               <programlisting>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  -&lt;!-- $Id: master.xml,v 1.1 2006/09/18 16:48:19 nrichards Exp $ --&gt;
  +&lt;!-- $Id: master.xml,v 1.2 2006/11/01 18:14:13 nrichards Exp $ --&gt;
   
   &lt;server&gt;
     &lt;!--
  
  
  



More information about the jboss-cvs-commits mailing list