INT-3607 Fix <transactional/> Docs
JIRA: https://jira.spring.io/browse/INT-3607
This commit is contained in:
committed by
Artem Bilan
parent
1bc3cfd35e
commit
d54b27dd0d
@@ -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><transactional/></code> child element cannot be specified; instead,
|
||||
declare a <code><tx:advice/></code> bean and add it to the <code><advice-chain/></code>.
|
||||
See <xref linkend="transaction-poller" /> for complete configuration.
|
||||
</important>
|
||||
|
||||
<para>
|
||||
<emphasis>TaskExecutor Support</emphasis>
|
||||
|
||||
@@ -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><advice-chain></emphasis> defined by the Poller.
|
||||
If you only need to address transactional concerns of the Poller, then you can still use the <emphasis><transactional></emphasis> element
|
||||
as a convinience.
|
||||
as a convenience.
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user