[Jboss-cvs] JBossAS SVN: r55963 - trunk/aop/docs/reference/reference/en/modules
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Aug 15 12:08:22 EDT 2006
Author: kabir.khan at jboss.com
Date: 2006-08-15 12:08:21 -0400 (Tue, 15 Aug 2006)
New Revision: 55963
Modified:
trunk/aop/docs/reference/reference/en/modules/running.xml
Log:
[JBAOP-280] From JBoss AS 4.0.5.CR1, the ordering within an .ear is as listed in the application.xml
Modified: trunk/aop/docs/reference/reference/en/modules/running.xml
===================================================================
--- trunk/aop/docs/reference/reference/en/modules/running.xml 2006-08-15 15:56:56 UTC (rev 55962)
+++ trunk/aop/docs/reference/reference/en/modules/running.xml 2006-08-15 16:08:21 UTC (rev 55963)
@@ -487,6 +487,41 @@
<literal>META-INF/jboss-aop.xml</literal>
file contained in the .aop file will affect all the classes in the whole war!
</para>
+ <para>
+ To pick up a .aop file in an .ear file, it must be listed in the
+ <literal>.ear/META-INF/application.xml</literal> as a java module, e.g.:
+ </para>
+ <programlisting>
+<![CDATA[
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN'
+ 'http://java.sun.com/j2ee/dtds/application_1_2.dtd'>
+
+<application>
+ <display-name>AOP in JBoss example</display-name>
+ <module>
+ <java>example.aop</java>
+ </module>
+ <module>
+ <ejb>aopexampleejb.jar</ejb>
+ </module>
+ <module>
+ <web>
+ <web-uri>aopexample.war</web-uri>
+ <context-root>/aopexample</context-root>
+ </web>
+ </module>
+</application>
+]]>
+ </programlisting>
+ <para>
+ Note that in newer versions of JBoss (>= 4.0.5), the contents of the .ear file are deployed in the order they
+ are listed in the application.xml. When using loadtime weaving the bindings listed in the example.aop file must be
+ deployed before the classes being advised are deployed, so that the bindings exist in the system before the
+ ejb, servlet etc. classes are loaded. This is acheived by listing the .aop file at the start of the application.xml.
+ Older versions of JBoss did not have this issue since the contained .aop files were deployed before anything else, and
+ this still holds true for other types of archives such as .sar and .war files.
+ </para>
</sect2>
<sect2>
<title>JBoss 4.x and JDK 1.4</title>
More information about the jboss-cvs-commits
mailing list