[jboss-cvs] JBossAS SVN: r72566 - in projects/aop/trunk/aop/docs/reference/reference/en: modules and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Apr 22 07:58:19 EDT 2008


Author: stalep
Date: 2008-04-22 07:58:19 -0400 (Tue, 22 Apr 2008)
New Revision: 72566

Added:
   projects/aop/trunk/aop/docs/reference/reference/en/modules/maven.xml
Modified:
   projects/aop/trunk/aop/docs/reference/reference/en/master.xml
   projects/aop/trunk/aop/docs/reference/reference/en/modules/annotated.xml
   projects/aop/trunk/aop/docs/reference/reference/en/modules/compiling.xml
   projects/aop/trunk/aop/docs/reference/reference/en/modules/running.xml
   projects/aop/trunk/aop/docs/reference/reference/en/modules/xml.xml
Log:
[JBAOP-559] removed jdk1.4 references, and added maven doc


Modified: projects/aop/trunk/aop/docs/reference/reference/en/master.xml
===================================================================
--- projects/aop/trunk/aop/docs/reference/reference/en/master.xml	2008-04-22 11:38:27 UTC (rev 72565)
+++ projects/aop/trunk/aop/docs/reference/reference/en/master.xml	2008-04-22 11:58:19 UTC (rev 72566)
@@ -13,6 +13,7 @@
 <!ENTITY compiling              SYSTEM "modules/compiling.xml">
 <!ENTITY running                SYSTEM "modules/running.xml">
 <!ENTITY reflection             SYSTEM "modules/reflection.xml">
+<!ENTITY maven                  SYSTEM "modules/maven.xml">
 ]>
 
 <book lang="en">
@@ -100,10 +101,11 @@
 
    &compiling;
 
+   &maven;
+
    &running;
 
    &reflection;
 
-   &aopide;
 </book>
 

Modified: projects/aop/trunk/aop/docs/reference/reference/en/modules/annotated.xml
===================================================================
--- projects/aop/trunk/aop/docs/reference/reference/en/modules/annotated.xml	2008-04-22 11:38:27 UTC (rev 72565)
+++ projects/aop/trunk/aop/docs/reference/reference/en/modules/annotated.xml	2008-04-22 11:58:19 UTC (rev 72566)
@@ -5,8 +5,7 @@
    <!-- *********************************** Intro ******************************** -->
 
    <para>
-         JDK 5.0 has introduced a new concept called annotations. Annotations can be
-         used as an alternative to XML for configuring classes for AOP. 
+         Annotations can be used as an alternative to XML for configuring classes for AOP. 
    </para>
 
    <!-- *********************************** Aspect ******************************** -->

Modified: projects/aop/trunk/aop/docs/reference/reference/en/modules/compiling.xml
===================================================================
--- projects/aop/trunk/aop/docs/reference/reference/en/modules/compiling.xml	2008-04-22 11:38:27 UTC (rev 72565)
+++ projects/aop/trunk/aop/docs/reference/reference/en/modules/compiling.xml	2008-04-22 11:58:19 UTC (rev 72566)
@@ -29,8 +29,7 @@
          JBoss AOP comes with an ant task that you can use for precompiling your
          classes with the aop precompiler. An example build.xml file is the basis
          for the explanation. (It is quite similar to the one used in the previous
-         chapter.) There will be differences in the build.xml file if you are using
-         JDK 1.4.2 or JDK 5.0, these are outlined below:
+         chapter.) 
       </para>
       <para>
          <programlisting><![CDATA[
@@ -49,7 +48,7 @@
          </programlisting>
       </para>
       <para>
-         Include the jars AOP depends on, these are common to all JDK's
+         Include the jars AOP depends on.
          <programlisting><![CDATA[
       <path id="javassist.classpath">
          <pathelement path="../../../javassist.jar"/>
@@ -66,7 +65,6 @@
       <path refid="jboss.common.core.classpath"/>
       <path refid="jboss.common.logging.spi.classpath"/>
       <path refid="jboss.common.logging.log4j.classpath"/>
-      <path refid="jboss.common.logging.jdk.classpath"/>
          <pathelement path="../../../jboss-common.jar"/>
       </path>
 
@@ -77,30 +75,14 @@
          <path refid="jboss.common.core.classpath"/>
          <path refid="jboss.common.logging.spi.classpath"/>
          <path refid="jboss.common.logging.log4j.classpath"/>
-         <path refid="jboss.common.logging.jdk.classpath"/>
          <path refid="concurrent.classpath"/>
       </path>]]>
          </programlisting>
       </para>
-      <para>
-         This snippet shows what to do for JDK 1.4. It will also work with
-         JDK 5.0 if your classes do not use JDK 5.0 style annotations and enums:
+     <para>
+         This snippet shows what to do if you are using JDK 5.0 annotations:
          <programlisting><![CDATA[
-      <!--                  JDK version 1.4.2                         -->
-      <!-- Do not include this if using JDK 5 with annotations!!!!  -->
-
-      <path id="jboss.aop.classpath">
-         <pathelement path="../../../jboss-aop.jar"/>
-      </path>
-
-      <!--            JDK version 1.4.2 - END                         -->]]>
-         </programlisting>
-      </para>
-      <para>
-         This snippet shows what to do for JDK 5.0 if you are using JDK 5.0 annotations:
-         <programlisting><![CDATA[
       <!--            JDK version 1.5                                 -->
-      <!-- Do not include this if using JDK 1.4.2!!!!                 -->
 
       <path id="jboss.aop.classpath">
          <pathelement path="../../../jboss-aop-jdk50.jar"/>
@@ -108,8 +90,6 @@
 
       <!--            JDK version 1.5 - END                           -->]]>
          </programlisting>
-   	   (You should only use one of the two previous snippets for setting up
-   	   jboss.aop.classpath)
       </para>
       <para>
          Now we set up the full classpath of all the needed libraries:
@@ -160,12 +140,6 @@
    </target>
 </project>]]>
          </programlisting>
-
-         If you are using JDK 1.4.2 and wish to use annotations, you need to define the
-         <literal>org.jboss.aop.ant.AnnotationC</literal> ant task, and run that BEFORE you
-         invoke the
-         <literal>org.jboss.aop.ant.AopC</literal> task. How to do this is shown
-         in the previous chapter.
       </para>
       <para>
          The
@@ -311,9 +285,7 @@
          <literal>@Aspect</literal> (See Chapter "Annotated Bindings").
             JBoss AOP will browse all classes in this path to see if they are annotated.
             The property can have one or files it points to delimited by the operating
-            systems specific classpath delimiter (';' on windows, ':' on unix). Note for this to
-            have effect with JDK 1.4, you first have to run the annotation compiler with
-            bytecode=true.
+            systems specific classpath delimiter (';' on windows, ':' on unix). 
       </para>
       <para>
             It is invoked as:
@@ -326,13 +298,8 @@
       <para>
          In the /bin folder of the distribution we have provided batch/script files to make
          this easier. It includes all the aop libs for you, so you just have to worry
-         about your files. The usage for JDK 1.4 is:
+         about your files. The usage:
          <programlisting>
-$ aopc &lt;classpath&gt; [-aoppath ...] [-aopclasspath ...] [-report] [-verbose] \
-      &lt;class files or directories&gt;+
-         </programlisting>
-         And for JDK 5:
-         <programlisting>
 $ aopc15 &lt;classpath&gt; [-aoppath ...] [-aopclasspath ...] [-report] [-verbose] \
       &lt;class files or directories&gt;+
          </programlisting>

Added: projects/aop/trunk/aop/docs/reference/reference/en/modules/maven.xml
===================================================================
--- projects/aop/trunk/aop/docs/reference/reference/en/modules/maven.xml	                        (rev 0)
+++ projects/aop/trunk/aop/docs/reference/reference/en/modules/maven.xml	2008-04-22 11:58:19 UTC (rev 72566)
@@ -0,0 +1,285 @@
+<chapter id="maven">
+
+  <title>Building JBoss AOP with Maven2</title>
+  <para>
+    Since JBoss AOP requires either loadtime or compiletime weaving we need to customize maven a bit
+    to make it do what we want. JBoss AOP provides plugins to make this weaving as easy as possible.
+  </para>
+
+  <para>
+    The JBoss AOP plugin is named jbossaop and is provided under the maven2 jboss.org repository. 
+    For the final releases use:
+    <programlisting><![CDATA[
+<repository>
+   <id>maven.jboss.org</id>
+   <name>JBoss Maven Repository</name>
+   <url>http://repository.jboss.com/maven2</url>
+</repository> ]]></programlisting>
+    If you want to use the snapshot releases use:
+    <programlisting><![CDATA[
+<repository>
+   <id>snapshots.jboss.org</id>
+   <name>JBoss Maven Snapshot Repository</name>
+   <url>http://snapshots.jboss.org/maven2</url>
+</repository>]]></programlisting>
+
+    The jbossaop maven plugin will provide all the aop dependencies needed to weave and run. There is no need
+    to include aop dependencies other than the plugin.
+
+    NOTE: The version used in these examples may be obsolete, please check the latest release for the reference
+    version instead of using the version in these examples.
+
+  </para>
+
+
+  <sect1 id="compiling" revision="1">
+    <title>AOP Compile with Maven2</title>
+    <para>
+    The aop compile plugin is configured to run after the default maven compile phase has ended. By default it
+    will try to find the jboss-aop.xml file in <literal>src/main/resources/jboss-aop.xml</literal>. It will also
+    try to weave every class in <literal>$project.build.outputDirectory</literal> (usually target/classes).
+    List of options:
+    <itemizedlist>
+      <listitem>
+        <para>
+          <literal>aoppaths</literal> - an array of possible jboss-aop.xml files. Default is 
+          <literal>src/main/resources/jboss-aop.xml</literal>
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          <literal>verbose</literal> - if set to true it will provide debug information during the aop weaving. '
+          Default set to true.
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          <literal>suppress</literal> - suppress when a class cannot be found that a class references. 
+          This may happen if code in a class references something and the class is not in the classpath. 
+          Default set to true.
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          <literal>noopt</literal> - do not optimize the weaving. Default set to false.
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          <literal>report</literal> - store the output to a file (<literal>aop-report.xml</literal>).
+          Default set to false.
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          <literal>includeProjectDependency</literal> - if set to true all project dependencies will also 
+          be included to the aop classpath. Only needed if a class inherits a class thats not defined in
+          the current module. Default set to false.
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          <literal>classPath</literal> - classpath, by default set to null. If its set to null it will use
+          the plugin dependencies (and add project dependencies if <literal>includeProjectDependency</literal>
+          is set) + the output build path. Do not change this if you are not sure.
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          <literal>aopClassPath</literal> - load xml files that adds aspects to the manager. Do not change this
+          if you are not sure. By default set to null.
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          <literal>includes</literal> - an array of classes that will be weaved. Note that if this is specified
+          just the classes thats specified here will be weaved. Default set to null.
+        </para>
+      </listitem>
+    </itemizedlist>
+    There are a lot of options that can be set, but noone are mandatory (if they are mandatory 
+    they have a default value set). The average user would most likely only change <literal>aoppaths</literal>.
+    A more complete example would look like:
+    <programlisting><![CDATA[
+<plugin>
+  <groupId>org.jboss.maven.plugins</groupId>
+  <artifactId>maven-jbossaop-plugin</artifactId>
+  <version>1.0</version>
+  <executions>
+    <execution>
+      <id>compile</id>
+      <configuration>
+      <!-- if you want to include dependencies from the current module
+           (only needed if a class inherits a class thats not defined in this module
+           -->
+        <includeProjectDependency>true</includeProjectDependency>
+        <aoppaths>
+          <aoppath>src/main/resources/jboss-aop_test2.xml</aoppath>
+          <!-- for a second jboss-aop.xml file
+          <aoppath>src/main/resources/jboss-aop.xml</aoppath>
+          -->
+        </aoppaths>
+        <!-- You can specify to only aopc a specific set of classes 
+        <includes>
+          <include>POJO.class</include>
+        </includes>
+        -->
+      </configuration>
+      <goals>
+        <goal>compile</goal>
+      </goals>
+    </execution>
+  </executions>
+</plugin> ]]></programlisting>
+    </para>
+  </sect1>
+
+  <sect1 id="compiletests" revision="1">
+    <title>AOP Compile tests with Maven2</title>
+    <para>
+    The only difference between aop compiling tests and non-tests are the name of the plugin. The options
+    are the same for tests and non-tests. A quick example:
+    <programlisting><![CDATA[
+<plugin>
+  <groupId>org.jboss.maven.plugins</groupId>
+  <artifactId>maven-jbossaop-plugin</artifactId>
+  <version>1.0</version>
+  <executions>
+    <execution>
+      <id>compile-test</id>
+      <configuration>
+        <aoppaths>
+          <aoppath>src/main/resources/jboss-aop_testcase.xml</aoppath>
+        </aoppaths>
+      </configuration>
+      <goals>
+        <goal>compile-test</goal>
+      </goals>
+    </execution> 
+  </executions>
+</plugin> ]]></programlisting>
+    </para>
+  </sect1>
+
+  <sect1 id="running" revision="1">
+    <title>Running precompiled with Maven2</title>
+    <para>
+    JBoss aop run plugin is configured to run after the package phase. There are less options here than for
+    the compile step and they are very similar.
+    <itemizedlist>
+      <listitem>
+        <para>
+          <literal>aoppaths</literal> - an array of possible jboss-aop.xml files. Default is 
+          <literal>src/main/resources/jboss-aop.xml</literal>
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          <literal>includeProjectDependency</literal> - if set to true all project dependencies will also 
+          be included to the aop classpath. Only needed if a class inherits a class thats not defined in
+          the current module. Default set to false.
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          <literal>classPath</literal> - classpath, by default set to null. If its set to null it will use
+          the plugin dependencies (and add project dependencies if <literal>includeProjectDependency</literal>
+          is set) + the output build path. Do not change this if you are not sure.
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+          <literal>executable</literal> - the java class that will be executed
+        </para>
+      </listitem>
+    </itemizedlist>
+    A small example using default jboss-aop.xml:
+    <programlisting><![CDATA[
+<plugin>
+  <groupId>org.jboss.maven.plugins</groupId>
+  <artifactId>maven-jbossaop-plugin</artifactId>
+  <version>1.0.CR1</version>
+  <executions>
+    <execution>
+      <id>run</id>
+      <configuration>
+        <executable>Foo</executable>
+      </configuration>
+      <goals>
+        <goal>run</goal>
+      </goals>
+    </execution> 
+  </executions>
+</plugin> ]]></programlisting>
+    </para>
+  </sect1>
+
+
+  <sect1 id="runningweaving" revision="1">
+    <title>Running loadtime weaving with Maven2</title>
+    <para>
+    Running a java application in loadtime weaving is almost identical to compile time (except that you dont need
+    to precompile it first). The only change is that we need an option to say that we want to run it loadtime.
+    <itemizedlist>
+      <listitem>
+        <para>
+          <literal>loadtime</literal> - set it to true if you want loadtime weaving. Default is set to false.
+        </para>
+      </listitem>
+    </itemizedlist>
+    A small example:
+    <programlisting><![CDATA[
+<plugin>
+  <groupId>org.jboss.maven.plugins</groupId>
+  <artifactId>maven-jbossaop-plugin</artifactId>
+  <version>1.0.CR1</version>
+  <executions>
+    <execution>
+      <id>run</id>
+      <configuration>
+        <aoppaths>
+          <aoppath>src/main/resources/jboss-aop_testcase.xml</aoppath>
+        </aoppaths>
+        <loadtime>true</loadtime>
+        <executable>Test</executable>
+      </configuration>
+      <goals>
+        <goal>run</goal>
+      </goals>
+    </execution> 
+  </executions>
+</plugin> ]]></programlisting>
+    </para>
+  </sect1>
+
+
+  <sect1 id="runningtests" revision="1">
+    <title>Running tests with Maven2</title>
+    <para>
+      Running tests with aop is a different matter since the maven tests plugin is rather complex. 
+      But we can add the hooks we need to run it both compiletime and loadtime with the maven tests too.
+      An example on how to run a test thats been aop compiled:
+      <programlisting><![CDATA[
+<plugin>
+  <groupId>org.apache.maven.plugins</groupId>
+  <artifactId>maven-surefire-plugin</artifactId>
+  <version>2.4</version>
+  <configuration>
+    <forkMode>always</forkMode>
+    <useSystemClassLoader>true</useSystemClassLoader>
+    <argLine>-Djboss.aop.path=src/main/resources/jboss-aop_testcase.xml</argLine>
+  </configuration>
+</plugin> ]]></programlisting>
+    </para>
+    <para>
+      To run it loadtime we only need to add the javaagent option to argLine. Like this:
+      <programlisting><![CDATA[
+    <argLine>-javaagent:${settings.localRepository}/org/jboss/jboss-aop/2.0.0.CR3/jboss-aop-2.0.0.CR3.jar -Djboss.aop.path=src/main/resources/jboss-aop_testcase.xml</argLine> ]]></programlisting>
+    - big thanks to henrik and finn for figuring out how to do this :)
+    Note again that the versions used here are just for a reference and to provide as examples. Check the JBoss AOP
+    homepage for the up-to-date versions.
+    </para>
+  </sect1>
+
+
+</chapter>

Modified: projects/aop/trunk/aop/docs/reference/reference/en/modules/running.xml
===================================================================
--- projects/aop/trunk/aop/docs/reference/reference/en/modules/running.xml	2008-04-22 11:38:27 UTC (rev 72565)
+++ projects/aop/trunk/aop/docs/reference/reference/en/modules/running.xml	2008-04-22 11:58:19 UTC (rev 72566)
@@ -23,10 +23,7 @@
       </para>
       <para>
       Loadtime weaving offers the ultimate flexibility.  JBoss AOP does not require a special classloader to do loadtime weaving, but there
-      are some issues that you need to think about.  JDK 1.4 does not have a standard simple way
-      of transforming/instrumenting classes at runtime, so what JBoss AOP does is have a way to modify <literal>java.lang.ClassLoader.class</literal>
-      to add the appropriate hooks.  Its pretty simple.  Take a look at the source under <literal>org.jboss.aop.hooks</literal> package and you'll see what we're doing
-      is not that magical at all.  Although this JDK 1.4 works with JDK 5, JDK5 actually has a simple standard mechanism of hooking in a class transformer
+      are some issues that you need to think about. JDK5 actually has a simple standard mechanism of hooking in a class transformer
          through the <literal>-javaagent</literal>.  JBoss AOP an additional load-time transformer that can hook into classloading via this standard mechanism.
       </para>
        <para>
@@ -73,14 +70,9 @@
                   <literal>jboss-common.jar</literal>
                </listitem>
                <listitem>
-                  <literal>jboss-aop.jar</literal>
-               </listitem>
-               <listitem>
-                  or
                   <literal>jboss-aop-jdk50.jar</literal>
                </listitem>
             </itemizedlist>
-               - depending on if you are using JDK 1.4 (jboss-aop.jar) or JDK 5.0 (jboss-aop-jdk50.jar)
          </para>
          <para>
             JBoss AOP finds XML configuration files in these two ways:
@@ -126,13 +118,8 @@
          <para>
             In the /bin folder of the distribution we have provided batch/script files to make
             this easier. It includes all the aop libs for you, so you just have to worry
-            about your files. The usage for JDK 1.4 is:
+            about your files. The usage:
             <programlisting>
-$ run-precompiled classpath [-aoppath path_to_aop.xml] [-aopclasspath path_to_annotated] \
-      com.blah.MyMainClass [args...]
-            </programlisting>
-            For JDK 5:
-            <programlisting>
 $ run-precompiled15 classpath [-aoppath path_to_aop.xml] [-aopclasspath path_to_annotated] \
       com.blah.MyMainClass [args...]
             </programlisting>
@@ -143,8 +130,7 @@
             via annotations (
             <literal>@Aspect</literal> etc.) you must pass in this classpath
             via the
-            <literal>-aopclasspath</literal> parameter. (For JDK 1.4, you must have compiled
-            the annotations first).
+            <literal>-aopclasspath</literal> parameter. 
          </para>
       </sect2>
       <sect2>
@@ -152,68 +138,13 @@
          <para>
             This section describes how to use loadtime instrumentation of classes with aop. The
             classes themselves are just compiled using Java, but are not precompiled with the aop
-            precompiler. (If you want to use annotations with JDK 1.4, you will still need to use the JDK 1.4 Annotation Compiler).
+            precompiler. 
             In the examples given
             if your classes are contained in a jar with a META-INF/jboss-aop.xml file, you
             would omit the
             <literal>-Djboss.aop.path</literal> system property.
          </para>
          <sect3>
-            <title>Loadtime JDK 1.4</title>
-            <para>
-            In order to do loadtime weaving of aspects with JDK 1.4, we had to massage <literal>java.lang.ClassLoader</literal>.
-            <literal>java.lang.ClassLoader</literal> is modified to add hooks for class transformation before class loading.
-            It is very similar to JDK 5's built in ability to define class transformers.
-            What you have to do is generate a modification of <literal>java.lang.ClassLoader</literal> and
-            add this class to the default bootstrap class path (bootclasspath) for your classes to get
-            instrumented at loadtime. The classes used are dependent upon the VM. At present this
-            custom classloader has only been tested with Sun's J2SE 1.4.x and 5.0. The
-            steps to compile and use the custom classloader are shown below.
-            </para>
-            <para>
-               <programlisting>
-$ java -cp=&lt;classpath as described above&gt;  \
-       org.jboss.aop.hook.GenerateInstrumentedClassLoader &lt;output dir&gt;
-               </programlisting>
-            </para>
-            <para>
-            For the following example, the
-               <literal>aop boot classpath</literal> should be
-            the
-               <literal>output dir</literal> specified above, followed by the jars
-            needed for AOP, i.e.
-               <literal>javassist.jar</literal>,
-               <literal>trove.jar</literal>,
-               <literal>concurrent.jar</literal>,
-               <literal>jboss-common.jar</literal> and
-               <literal>jboss-aop.jar</literal>. You separate the classpath elements
-            as normal, with ';' (Windows) or ':' (Unix). The path to your classes should
-            NOT be included here! You then use this
-               <literal>aop boot classpath</literal>
-            as the argument for
-               <literal>-Xbootclasspath</literal> option as shown here:
-               <programlisting>
-$ java -Xbootclasspath/p:&lt;aop boot classpath as described&gt; \
-      -Djboss.aop.path=&lt;path to jboss-aop.xml&gt; \
-      -classpath &lt;path to your classes&gt; com.blah.MyMainClass
-               </programlisting>
-            </para>
-            <para>
-            In the /bin folder of the distribution we have provided batch/script files to make
-            this easier. It includes all the aop libs for you, so you just have to worry
-            about your files:
-               <programlisting>
-$ run-load-boot classpath [-aoppath path_to_aop.xml] [-aopclasspath path_to_annotated] \
-      com.blah.MyMainClass [args...]
-               </programlisting>
-            The parameters have the same meaning as for the run-precompiled scripts. (Since
-            this is for JDK 1.4, you must have compiled the annotations first). This script
-            both creates the instrumented class loader and makes sure that that the JAVA_HOME
-            environment variable has been set (Your job is to make sure it points to a 1.4
-            distribution!).
-            </para>
-         </sect3>
-         <sect3>
             <title>Loadtime with JDK 5</title>
             <para>
                JDK 5.0 has a pluggable way of defining a class transformer via the
@@ -267,17 +198,8 @@
          <sect3>
             <title>Loadtime using JRockit</title>
             <para>
-            In JRockit the -Xbootclass/p option does not work, so we cannot replace the classloader. Instead we plug
-            natively into its JVM using vendor specific hooks to provide transformation when a class is loaded. All
-            you have to do is define an additional switch on the Java command line.
-               <literal>-Xmanagement:class=org.jboss.aop.hook.JRockitClassPreProcessor</literal>
-            Here's how run an AOP application in JDK 1.4 with loadtime instrumentation, with JRockit:
-               <programlisting>
-$ java -cp=&lt;classpath as described above&gt; -Djboss.aop.path=&lt;path to jboss-aop.xml&gt; \
-      -Xmanagement:class=org.jboss.aop.hook.JRockitClassPreProcessor com.blah.MyMainClass
-               </programlisting>
-            The above will also work with JRockit 5.0, but this can also use the "normal" -javaagent switch.
-            </para>
+            JRockit 5+ supports the "normal" -javaagent switch.
+           </para>
          </sect3>
          <sect3>
             <title>Improving Loadtime Performance</title>
@@ -318,7 +240,7 @@
                   <para>
                      Filtering probably has the greatest effect on overall boot-time speed.
                      If you've ever worked with a Java profiling product before, you probably noticed that it has an option
-                     to filter classes that you are not interested in profiling.  THis can speed up performance of the tool.
+                     to filter classes that you are not interested in profiling.  This can speed up performance of the tool.
                      JBoss AOP has to analyze every class in the system to make sure it does not need to be transformed.  THis
                       is one reason why load-time weaving can be so slow.  You can give JBoss AOP a lot of help by specifying
                       sets of classes that do not need to be transformed.
@@ -395,10 +317,10 @@
                   </listitem>
                </varlistentry>
                <varlistentry>
-                  <term>bootclasspath Vs. JDK5 -javaagent</term>
+                  <term>bootclasspath Vs. -javaagent</term>
                   <listitem>
                      <para>
-                        It is significantly slower to use the -javaagent vs. the JDK 1.4 bootclasspath approach.  So, if you are using JDK5, use the JDK1.4 bootclasspath approach.
+                        It is significantly slower to use the -javaagent vs. the bootclasspath approach. 
                      </para>
                   </listitem>
                </varlistentry>
@@ -545,94 +467,6 @@
 			</para>
       </sect2>
       <sect2>
-         <title>JBoss 4.x and JDK 1.4</title>
-      <para>
-         JBoss AOP comes distributed with the JBoss 4.x Application Server.  It is best to download the latest
-         version and update your JBoss Application Server installation as described in the "Installing" chapter
-         of this guide.  Also, the version distributed with JBoss 4.x Application Server may not be up to date.
-         Check http://www.jboss.org/products/aop to see if a new version of JBoss AOP is available.  To install a new
-         version remove the jboss-aop.deployer file from the JBoss AS deploy/ directory and copy the jboss-aop.deployer
-         directory from the JBoss AOP distribution to the JBoss AS deploy/ directory.  This jboss-aop.deployer/ is in
-         the JBoss AOP distribution within the jboss-40-install/ directory.
-      </para>
-      <para>
-         JBoss 4.x Application Server works out of the box with precompiled applications.  If you want to do load-time
-         transformations, you must edit jboss-aop.deployer/META-INF/jboss-service.xml as follows:
-      </para>
-      <para>
-         The
-         <literal>jboss-aop.deployer</literal> file contains some MBeans that deploy and manage
-         the AOP framework.
-         <programlisting>
-            <![CDATA[      <mbean code="org.jboss.aop.deployment.AspectManagerService"
-         name="jboss.aop:service=AspectManager">
-         <attribute name="EnableLoadtimeWeaving">false</attribute>
-         <!-- These switches are only relevant when EnableLoadtimeWeaving is true -->
-         <attribute name="SuppressTransformationErrors">true</attribute>
-         <attribute name="Prune">true</attribute>
-         <attribute name="Include">org.jboss.test</attribute>
-         <attribute name="Exclude">org.jboss.</attribute>
-         <attribute name="Optimized">true</attribute>
-         <attribute name="Verbose">false</attribute>
-      </mbean>
-
-      <mbean code="org.jboss.aop.deployment.AspectDeployer"
-         name="jboss.aop:service=AspectDeployer">
-      </mbean>
- ]]>   </programlisting>
-      </para>
-      <para>
-         By default, JBoss application server will not do load-time bytecode manipulation
-         of AOP files. You can turn load-time on by
-         setting the EnableLoadtimeWeaving attribute to true. If SuppressTransformationErrors is
-         true failed bytecode transformation will only give an error warning. This flag is
-         needed because sometimes a JBoss deployment will not have all the classes a class references.
-      </para>
-         <para>
-            The next thing you have to do is create a new <literal>java.lang.ClassLoader.class</literal>.  This new class will
-            bytecode modify a copy of java.lang.ClassLoader.class to put in the appropriate hooks for loadtime transformation.
-            There is a script in the bin/ directory of the JBoss-AOP distribution to create this class and also create a jar from it.
-         </para>
-         <programlisting>
-$ cd jboss-aop1.3.bin
-$ create-pluggable-jboss-classloader.sh
-         </programlisting>
-         <para>
-            This will create a jboss-classloader-transformer.jar.  Copy this jar to the bin/ directory of your JBoss Application
-            server distribution.
-         </para>
-         <para>
-            Next, you need to copy
-            the jdk14-pluggable-instrumentor.jar from the lib-14/ directory of your JBoss AOP
-            distribution to the bin/ directory of your JBoss application server installation.  Next edit
-            run.sh or run.bat (depending on what OS you're on) and add the following to the JAVA_OPTS environment
-            variable
-         </para>
-         <para>
-            On Unix/linux edit run.sh (note the <literal>:</literal> separating the bootclasspath entries)
-         <programlisting>
-JAVA_OPTS="$JAVA_OPTS -Dprogram.name=%PROGNAME% \
--Xbootclasspath/p:jboss-classloader-transformer.jar:jdk14-pluggable-instrumentor.jar"
-         </programlisting>
-         Note that if you are using a cygwin shell on Windows, you will need to use a semicolon instead of a colon to separate the
-         bootclasspath jars:
-         <programlisting>
-JAVA_OPTS="$JAVA_OPTS -Dprogram.name=%PROGNAME% \
--Xbootclasspath/p:jboss-classloader-transformer.jar;jdk14-pluggable-instrumentor.jar"
-         </programlisting>
-         </para>
-         <para>
-            On Windows edit run.bat (note the <literal>;</literal> separating the bootclasspath entries)
-         <programlisting>
-set JAVA_OPTS=%JAVA_OPTS% -Dprogram.name=%PROGNAME% \
--Xbootclasspath/p:jboss-classloader-transformer.jar;jdk14-pluggable-instrumentor.jar
-         </programlisting>
-         </para>
-         <para>
-            After modifying JAVA_OPTS and setting the EnableLoadtimeWeaving to true, then you should be ready to go.
-         </para>
-      </sect2>
-      <sect2>
          <title>JBoss 4.x and JDK 5</title>
          <para>
             JBoss AS has special integration with JDK 5.0 to do loadtime transformations.  This section explains how to use it.
@@ -697,10 +531,6 @@
    <!-- 4.0 and jrockit -->
       <sect2>
          <title>JBoss 4.x and JRockit</title>
-         <para>
-         	To use loadtime transformations with JRockit we can instruct Jrockit to use its native classloader hooks. Note that
-         	with JRockit 1.4.2 this is your only option to do loadtime transformations.
-         </para>
       <para>
          If you are using JRockit 5.0 and you wish to use the JDK 5 features of JBoss AOP, you should replace jboss-aop.deployer
          with jboss-aop-jdk50.deployer as mentioned in "JBoss 4.x and JDK 5.0".

Modified: projects/aop/trunk/aop/docs/reference/reference/en/modules/xml.xml
===================================================================
--- projects/aop/trunk/aop/docs/reference/reference/en/modules/xml.xml	2008-04-22 11:38:27 UTC (rev 72565)
+++ projects/aop/trunk/aop/docs/reference/reference/en/modules/xml.xml	2008-04-22 11:58:19 UTC (rev 72566)
@@ -8,7 +8,7 @@
          In the last sections you saw how to
          code aspects and how pointcut expressions are formed.  This chapter puts it all together.  There are two
          forms of bindings for advices, mixins, and introductions.  One is XML which will be the focus of this chapter.
-         The Annotated Bindings chapter discusses how you can replace XML with JDK 5.0 annotations.
+         The Annotated Bindings chapter discusses how you can replace XML with annotations.
       </para>
    </sect1>
    <sect1 id="xml-resolving" revision="1">




More information about the jboss-cvs-commits mailing list