changed section ids so they don't clash with aop-spring.xml

This commit is contained in:
Thomas Risberg 2009-06-09 23:28:54 +00:00
parent 278488d11e
commit 48e7c44c35
1 changed files with 45 additions and 45 deletions

View File

@ -3,7 +3,7 @@
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
<appendix id="classic-aop-spring"> <appendix id="classic-aop-spring">
<title>Classic Spring AOP Usage</title> <title>Classic Spring AOP Usage</title>
<section id="aop-classic-introduction"> <section id="classic-aop-classic-introduction">
<para>In this chapter we discuss <para>In this chapter we discuss
the lower-level Spring AOP APIs and the AOP support used in Spring 1.2 applications. the lower-level Spring AOP APIs and the AOP support used in Spring 1.2 applications.
For new applications, we recommend the use of the Spring 2.0 AOP support For new applications, we recommend the use of the Spring 2.0 AOP support
@ -15,12 +15,12 @@
</section> </section>
<section id="aop-api-pointcuts"> <section id="classic-aop-api-pointcuts">
<title>Pointcut API in Spring</title> <title>Pointcut API in Spring</title>
<para>Let's look at how Spring handles the crucial pointcut concept.</para> <para>Let's look at how Spring handles the crucial pointcut concept.</para>
<section id="aop-api-concepts"> <section id="classic-aop-api-concepts">
<title>Concepts</title> <title>Concepts</title>
<para>Spring's pointcut model enables pointcut reuse independent of <para>Spring's pointcut model enables pointcut reuse independent of
@ -88,7 +88,7 @@
</tip> </tip>
</section> </section>
<section id="aop-api-pointcut-ops"> <section id="classic-aop-api-pointcut-ops">
<title>Operations on pointcuts</title> <title>Operations on pointcuts</title>
<para>Spring supports operations on pointcuts: notably, <para>Spring supports operations on pointcuts: notably,
@ -115,7 +115,7 @@
</section> </section>
<section id="aop-api-pointcuts-aspectj"> <section id="classic-aop-api-pointcuts-aspectj">
<title>AspectJ expression pointcuts</title> <title>AspectJ expression pointcuts</title>
<para>Since 2.0, the most important type of pointcut used by Spring is <para>Since 2.0, the most important type of pointcut used by Spring is
@ -128,14 +128,14 @@
</para> </para>
</section> </section>
<section id="aop-api-pointcuts-impls"> <section id="classic-aop-api-pointcuts-impls">
<title>Convenience pointcut implementations</title> <title>Convenience pointcut implementations</title>
<para>Spring provides several convenient pointcut implementations. Some <para>Spring provides several convenient pointcut implementations. Some
can be used out of the box; others are intended to be subclassed in can be used out of the box; others are intended to be subclassed in
application-specific pointcuts.</para> application-specific pointcuts.</para>
<section id="aop-api-pointcuts-static"> <section id="classic-aop-api-pointcuts-static">
<title>Static pointcuts</title> <title>Static pointcuts</title>
<para>Static pointcuts are based on method and target class, and <para>Static pointcuts are based on method and target class, and
@ -148,7 +148,7 @@
<para>Let's consider some static pointcut implementations included <para>Let's consider some static pointcut implementations included
with Spring.</para> with Spring.</para>
<section id="aop-api-pointcuts-regex"> <section id="classic-aop-api-pointcuts-regex">
<title>Regular expression pointcuts</title> <title>Regular expression pointcuts</title>
<para>One obvious way to specify static pointcuts is regular <para>One obvious way to specify static pointcuts is regular
@ -204,7 +204,7 @@
with any Advice type.</para> with any Advice type.</para>
</section> </section>
<section id="aop-api-pointcuts-attribute-driven"> <section id="classic-aop-api-pointcuts-attribute-driven">
<title>Attribute-driven pointcuts</title> <title>Attribute-driven pointcuts</title>
<para>An important type of static pointcut is a <para>An important type of static pointcut is a
@ -213,7 +213,7 @@
</section> </section>
</section> </section>
<section id="aop-api-pointcuts-dynamic"> <section id="classic-aop-api-pointcuts-dynamic">
<title>Dynamic pointcuts</title> <title>Dynamic pointcuts</title>
<para>Dynamic pointcuts are costlier to evaluate than static <para>Dynamic pointcuts are costlier to evaluate than static
@ -225,7 +225,7 @@
<para>The main example is the <literal>control flow</literal> <para>The main example is the <literal>control flow</literal>
pointcut.</para> pointcut.</para>
<section id="aop-api-pointcuts-cflow"> <section id="classic-aop-api-pointcuts-cflow">
<title>Control flow pointcuts</title> <title>Control flow pointcuts</title>
<para>Spring control flow pointcuts are conceptually similar to <para>Spring control flow pointcuts are conceptually similar to
@ -247,7 +247,7 @@
</section> </section>
</section> </section>
<section id="aop-api-pointcuts-superclasses"> <section id="classic-aop-api-pointcuts-superclasses">
<title>Pointcut superclasses</title> <title>Pointcut superclasses</title>
<para>Spring provides useful pointcut superclasses to help you to <para>Spring provides useful pointcut superclasses to help you to
@ -269,7 +269,7 @@
RC2 and above.</para> RC2 and above.</para>
</section> </section>
<section id="aop-api-pointcuts-custom"> <section id="classic-aop-api-pointcuts-custom">
<title>Custom pointcuts</title> <title>Custom pointcuts</title>
<para>Because pointcuts in Spring AOP are Java classes, rather than <para>Because pointcuts in Spring AOP are Java classes, rather than
@ -286,12 +286,12 @@
</section> </section>
</section> </section>
<section id="aop-api-advice"> <section id="classic-aop-api-advice">
<title>Advice API in Spring</title> <title>Advice API in Spring</title>
<para>Let's now look at how Spring AOP handles advice.</para> <para>Let's now look at how Spring AOP handles advice.</para>
<section id="aop-api-advice-lifecycle"> <section id="classic-aop-api-advice-lifecycle">
<title>Advice lifecycles</title> <title>Advice lifecycles</title>
<para>Each advice is a Spring bean. An advice instance can be shared across all <para>Each advice is a Spring bean. An advice instance can be shared across all
@ -313,14 +313,14 @@
the same AOP proxy.</para> the same AOP proxy.</para>
</section> </section>
<section id="aop-api-advice-types"> <section id="classic-aop-api-advice-types">
<title>Advice types in Spring</title> <title>Advice types in Spring</title>
<para>Spring provides several advice types out of the box, and is <para>Spring provides several advice types out of the box, and is
extensible to support arbitrary advice types. Let us look at the basic extensible to support arbitrary advice types. Let us look at the basic
concepts and standard advice types.</para> concepts and standard advice types.</para>
<section id="aop-api-advice-around"> <section id="classic-aop-api-advice-around">
<title>Interception around advice</title> <title>Interception around advice</title>
<para>The most fundamental advice type in Spring is <para>The most fundamental advice type in Spring is
@ -373,7 +373,7 @@
pointcut interfaces.</para></note> pointcut interfaces.</para></note>
</section> </section>
<section id="aop-api-advice-before"> <section id="classic-aop-api-advice-before">
<title>Before advice</title> <title>Before advice</title>
<para>A simpler advice type is a <emphasis role="bold">before <para>A simpler advice type is a <emphasis role="bold">before
@ -424,7 +424,7 @@
<tip><para>Before advice can be used with any pointcut.</para></tip> <tip><para>Before advice can be used with any pointcut.</para></tip>
</section> </section>
<section id="aop-api-advice-throws"> <section id="classic-aop-api-advice-throws">
<title>Throws advice</title> <title>Throws advice</title>
<para><emphasis role="bold">Throws advice</emphasis> is invoked after <para><emphasis role="bold">Throws advice</emphasis> is invoked after
@ -492,7 +492,7 @@
<tip><para>Throws advice can be used with any pointcut.</para></tip> <tip><para>Throws advice can be used with any pointcut.</para></tip>
</section> </section>
<section id="aop-api-advice-after-returning"> <section id="classic-aop-api-advice-after-returning">
<title>After Returning advice</title> <title>After Returning advice</title>
<para>An after returning advice in Spring must implement the <para>An after returning advice in Spring must implement the
@ -533,7 +533,7 @@
<tip><para>After returning advice can be used with any pointcut.</para></tip> <tip><para>After returning advice can be used with any pointcut.</para></tip>
</section> </section>
<section id="aop-api-advice-introduction"> <section id="classic-aop-api-advice-introduction">
<title>Introduction advice</title> <title>Introduction advice</title>
<para>Spring treats introduction advice as a special kind of <para>Spring treats introduction advice as a special kind of
interception advice.</para> interception advice.</para>
@ -752,7 +752,7 @@ public interface IntroductionInfo {
</section> </section>
</section> </section>
<section id="aop-api-advisor"> <section id="classic-aop-api-advisor">
<title>Advisor API in Spring</title> <title>Advisor API in Spring</title>
<para>In Spring, an Advisor is an aspect that contains just a single advice <para>In Spring, an Advisor is an aspect that contains just a single advice
@ -771,7 +771,7 @@ public interface IntroductionInfo {
automatically create the necessary interceptor chain.</para> automatically create the necessary interceptor chain.</para>
</section> </section>
<section id="aop-pfb"> <section id="classic-aop-pfb">
<title>Using the ProxyFactoryBean to create AOP proxies</title> <title>Using the ProxyFactoryBean to create AOP proxies</title>
<para>If you're using the Spring IoC container (an ApplicationContext or <para>If you're using the Spring IoC container (an ApplicationContext or
@ -790,7 +790,7 @@ public interface IntroductionInfo {
and their ordering. However, there are simpler options that are preferable and their ordering. However, there are simpler options that are preferable
if you don't need such control.</para> if you don't need such control.</para>
<section id="aop-pfb-1"> <section id="classic-aop-pfb-1">
<title>Basics</title> <title>Basics</title>
<para>The <literal>ProxyFactoryBean</literal>, like other Spring <para>The <literal>ProxyFactoryBean</literal>, like other Spring
@ -813,7 +813,7 @@ public interface IntroductionInfo {
pluggability provided by Dependency Injection.</para> pluggability provided by Dependency Injection.</para>
</section> </section>
<section id="aop-pfb-2"> <section id="classic-aop-pfb-2">
<title>JavaBean properties</title> <title>JavaBean properties</title>
<para> <para>
In common with most <interfacename>FactoryBean</interfacename> implementations In common with most <interfacename>FactoryBean</interfacename> implementations
@ -931,7 +931,7 @@ public interface IntroductionInfo {
</itemizedlist> </itemizedlist>
</section> </section>
<section id="aop-pfb-proxy-types"> <section id="classic-aop-pfb-proxy-types">
<title>JDK- and CGLIB-based proxies</title> <title>JDK- and CGLIB-based proxies</title>
<para> <para>
This section serves as the definitive documentation on how the This section serves as the definitive documentation on how the
@ -1005,7 +1005,7 @@ public interface IntroductionInfo {
</section> </section>
<section id="aop-api-proxying-intf"> <section id="classic-aop-api-proxying-intf">
<title>Proxying interfaces</title> <title>Proxying interfaces</title>
<para> <para>
@ -1129,7 +1129,7 @@ public interface IntroductionInfo {
example, in certain test scenarios.</para> example, in certain test scenarios.</para>
</section> </section>
<section id="aop-api-proxying-class"> <section id="classic-aop-api-proxying-class">
<title>Proxying classes</title> <title>Proxying classes</title>
<para>What if you need to proxy a class, rather than one or more <para>What if you need to proxy a class, rather than one or more
@ -1176,7 +1176,7 @@ public interface IntroductionInfo {
decisive consideration in this case.</para> decisive consideration in this case.</para>
</section> </section>
<section id="aop-global-advisors"> <section id="classic-aop-global-advisors">
<title>Using 'global' advisors</title> <title>Using 'global' advisors</title>
<para>By appending an asterisk to an interceptor name, all advisors with <para>By appending an asterisk to an interceptor name, all advisors with
@ -1198,7 +1198,7 @@ public interface IntroductionInfo {
</section> </section>
</section> </section>
<section id="aop-concise-proxy"> <section id="classic-aop-concise-proxy">
<title>Concise proxy definitions</title> <title>Concise proxy definitions</title>
<para>Especially when defining transactional proxies, you may end up with <para>Especially when defining transactional proxies, you may end up with
@ -1261,7 +1261,7 @@ public interface IntroductionInfo {
it.</para> it.</para>
</section> </section>
<section id="aop-prog"> <section id="classic-aop-prog">
<title>Creating AOP proxies programmatically with the ProxyFactory</title> <title>Creating AOP proxies programmatically with the ProxyFactory</title>
<para>It's easy to create AOP proxies programmatically using Spring. This <para>It's easy to create AOP proxies programmatically using Spring. This
@ -1298,7 +1298,7 @@ MyBusinessInterface tb = (MyBusinessInterface) factory.getProxy();</programlisti
</tip> </tip>
</section> </section>
<section id="aop-api-advised"> <section id="classic-aop-api-advised">
<title>Manipulating advised objects</title> <title>Manipulating advised objects</title>
<para>However you create AOP proxies, you can manipulate them using the <para>However you create AOP proxies, you can manipulate them using the
@ -1392,7 +1392,7 @@ assertEquals("Added two advisors",
advice modification is known not to be required.</para> advice modification is known not to be required.</para>
</section> </section>
<section id="aop-autoproxy"> <section id="classic-aop-autoproxy">
<title>Using the "autoproxy" facility</title> <title>Using the "autoproxy" facility</title>
<para>So far we've considered explicit creation of AOP proxies using a <para>So far we've considered explicit creation of AOP proxies using a
@ -1423,13 +1423,13 @@ assertEquals("Added two advisors",
</listitem> </listitem>
</itemizedlist> </itemizedlist>
<section id="aop-autoproxy-choices"> <section id="classic-aop-autoproxy-choices">
<title>Autoproxy bean definitions</title> <title>Autoproxy bean definitions</title>
<para>The <literal>org.springframework.aop.framework.autoproxy</literal> <para>The <literal>org.springframework.aop.framework.autoproxy</literal>
package provides the following standard autoproxy creators.</para> package provides the following standard autoproxy creators.</para>
<section id="aop-api-autoproxy"> <section id="classic-aop-api-autoproxy">
<title>BeanNameAutoProxyCreator</title> <title>BeanNameAutoProxyCreator</title>
<para>The <literal>BeanNameAutoProxyCreator</literal> class is a <para>The <literal>BeanNameAutoProxyCreator</literal> class is a
@ -1465,7 +1465,7 @@ assertEquals("Added two advisors",
differently to different beans.</para> differently to different beans.</para>
</section> </section>
<section id="aop-api-autoproxy-default"> <section id="classic-aop-api-autoproxy-default">
<title>DefaultAdvisorAutoProxyCreator</title> <title>DefaultAdvisorAutoProxyCreator</title>
<para>A more general and extremely powerful auto proxy creator is <para>A more general and extremely powerful auto proxy creator is
@ -1544,7 +1544,7 @@ assertEquals("Added two advisors",
configurable order value; the default setting is unordered.</para> configurable order value; the default setting is unordered.</para>
</section> </section>
<section id="aop-api-autoproxy-abstract"> <section id="classic-aop-api-autoproxy-abstract">
<title>AbstractAdvisorAutoProxyCreator</title> <title>AbstractAdvisorAutoProxyCreator</title>
<para>This is the superclass of DefaultAdvisorAutoProxyCreator. You <para>This is the superclass of DefaultAdvisorAutoProxyCreator. You
@ -1555,7 +1555,7 @@ assertEquals("Added two advisors",
</section> </section>
</section> </section>
<section id="aop-autoproxy-metadata"> <section id="classic-aop-autoproxy-metadata">
<title>Using metadata-driven auto-proxying</title> <title>Using metadata-driven auto-proxying</title>
<para>A particularly important type of autoproxying is driven by <para>A particularly important type of autoproxying is driven by
@ -1703,7 +1703,7 @@ assertEquals("Added two advisors",
</section> </section>
</section> </section>
<section id="aop-targetsource"> <section id="classic-aop-targetsource">
<title>Using TargetSources</title> <title>Using TargetSources</title>
<para>Spring offers the concept of a <emphasis>TargetSource</emphasis>, <para>Spring offers the concept of a <emphasis>TargetSource</emphasis>,
@ -1732,7 +1732,7 @@ assertEquals("Added two advisors",
Spring to create a new target instance when required.</para> Spring to create a new target instance when required.</para>
</tip> </tip>
<section id="aop-ts-swap"> <section id="classic-aop-ts-swap">
<title>Hot swappable target sources</title> <title>Hot swappable target sources</title>
<para>The <para>The
@ -1773,7 +1773,7 @@ Object oldTarget = swapper.swap(newTarget);</programlisting></para>
with arbitrary advice.</para> with arbitrary advice.</para>
</section> </section>
<section id="aop-ts-pool"> <section id="classic-aop-ts-pool">
<title>Pooling target sources</title> <title>Pooling target sources</title>
<para>Using a pooling target source provides a similar programming model <para>Using a pooling target source provides a similar programming model
@ -1857,7 +1857,7 @@ System.out.println("Max pool size is " + conf.getMaxSize());]]></programlisting>
set the TargetSources used by any autoproxy creator.</para> set the TargetSources used by any autoproxy creator.</para>
</section> </section>
<section id="aop-ts-prototype"> <section id="classic-aop-ts-prototype">
<title>Prototype target sources</title> <title>Prototype target sources</title>
<para>Setting up a "prototype" target source is similar to a pooling <para>Setting up a "prototype" target source is similar to a pooling
@ -1881,7 +1881,7 @@ System.out.println("Max pool size is " + conf.getMaxSize());]]></programlisting>
must be a prototype bean definition.</para> must be a prototype bean definition.</para>
</section> </section>
<section id="aop-ts-threadlocal"> <section id="classic-aop-ts-threadlocal">
<title><classname>ThreadLocal</classname> target sources</title> <title><classname>ThreadLocal</classname> target sources</title>
<para><classname>ThreadLocal</classname> target sources are useful if you need an object to be <para><classname>ThreadLocal</classname> target sources are useful if you need an object to be
@ -1912,7 +1912,7 @@ System.out.println("Max pool size is " + conf.getMaxSize());]]></programlisting>
</section> </section>
</section> </section>
<section id="aop-extensibility"> <section id="classic-aop-extensibility">
<title>Defining new <interfacename>Advice</interfacename> types</title> <title>Defining new <interfacename>Advice</interfacename> types</title>
<para>Spring AOP is designed to be extensible. While the interception <para>Spring AOP is designed to be extensible. While the interception
@ -1931,7 +1931,7 @@ System.out.println("Max pool size is " + conf.getMaxSize());]]></programlisting>
Javadocs for further information.</para> Javadocs for further information.</para>
</section> </section>
<section id="aop-api-resources"> <section id="classic-aop-api-resources">
<title>Further resources</title> <title>Further resources</title>
<para>Please refer to the Spring sample applications for further examples <para>Please refer to the Spring sample applications for further examples