INT-3607 Fix <transactional/> Docs

JIRA: https://jira.spring.io/browse/INT-3607
This commit is contained in:
Gary Russell
2015-01-13 14:09:05 -05:00
committed by Artem Bilan
parent 1bc3cfd35e
commit d54b27dd0d
2 changed files with 9 additions and 4 deletions

View File

@@ -461,14 +461,14 @@ consumer.setTaskExecutor(taskExecutor);</programlisting>
Since Spring transaction support depends on the Proxy mechanism  with <classname>TransactionInterceptor</classname> (AOP Advice) handling transactional
behavior of the message flow initiated by the poller, some times there is a need to provide extra Advice(s) to handle other
cross cutting behavior associated with the poller. For that poller defines an <emphasis>advice-chain</emphasis> element allowing you to add
more advices - class that  implements <classname>MethodInterceptor</classname> interface.. 
more advices - class that  implements <classname>MethodInterceptor</classname> interface...
<programlisting language="xml"><![CDATA[<int:service-activator id="advicedSa" input-channel="goodInputWithAdvice" ref="testBean"
method="good" output-channel="output">
<int:poller max-messages-per-poll="1" fixed-rate="10000">
<int:transactional transaction-manager="txManager" />
<int:advice-chain>
<ref bean="adviceA" />
<beans:bean class="org.bar.SampleAdvice"/>
<beans:bean class="org.bar.SampleAdvice" />
<ref bean="txAdvice" />
</int:advice-chain>
</int:poller>
</int:service-activator>]]></programlisting>
@@ -476,6 +476,11 @@ For more information on how to implement MethodInterceptor please refer to AOP s
reference manual (section 8 and 9). Advice chain can also be applied on the poller that does not have
any transaction configuration essentially allowing you to enhance the behavior of the message flow initiated by the poller.
</para>
<important>
When using an advice chain, the <code>&lt;transactional/&gt;</code> child element cannot be specified; instead,
declare a <code>&lt;tx:advice/&gt;</code> bean and add it to the <code>&lt;advice-chain/&gt;</code>.
See <xref linkend="transaction-poller" /> for complete configuration.
</important>
<para>
<emphasis>TaskExecutor Support</emphasis>

View File

@@ -153,7 +153,7 @@
As you can see from the example above, we have provided a very basic XML-based configuration of Spring Transaction advice  - "txAdvice" and
included it within the <emphasis>&lt;advice-chain&gt;</emphasis> defined by the Poller.
If you only need to address transactional concerns of the Poller, then you can still use the <emphasis>&lt;transactional&gt;</emphasis> element
as a convinience.
as a convenience.
</para>
</section>
</section>