INT-1849/INT-2606 Pseudo Transactional Message Src
Initial commit. Tested with POP3 and IMAP (James) with Sample app. Essentially moved all the flagging and deleting code from receive() to closeContextAfterSuccess(). For non-transactional cases, this new method is called immediately after receiving the message(s), essentially working as before. When run from a <transactional/> poller it is called using TransactionSynchronization after the transaction commits. This behavior can be changed by setting 'symchronized="false"' on the poller, which removes the synchronization and the update is called immediately after the receive(). Polishing PR Comments Update Reference
This commit is contained in:
committed by
Oleg Zhurakousky
parent
4e9a393983
commit
9bc9867d31
@@ -150,7 +150,7 @@
|
||||
</tx:advice>
|
||||
]]></programlisting>
|
||||
|
||||
As yo can see from the example above, we have provided a very basic XML-based configuration of Spring Transaction advice - "txAdvice" and
|
||||
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.
|
||||
@@ -173,4 +173,17 @@ as a convinience.
|
||||
that delegates to a transactional MessageStore strategy, or you could use a JMS-backed channel.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="poller-synch">
|
||||
<title>Pollers and Transaction Synchronization</title>
|
||||
<para>
|
||||
Certain inbound adapters are capable of synchronizing their updates with a transaction. For example, the mail
|
||||
inbound adapters, if running in a transaction and configured to mark or delete messages, will only take those
|
||||
actions on a mail message if the transaction commits; otherwise the mail message is left in the inbox.
|
||||
</para>
|
||||
<para>
|
||||
For all message sources that implement PseudoTransactionalMessageSource, this is the default behavior (commit and
|
||||
rollback detection). It can be disabled by setting the synchronized attribute on the poller to false.
|
||||
</para>
|
||||
</section>
|
||||
</chapter>
|
||||
|
||||
@@ -56,7 +56,15 @@
|
||||
<listitem>Stored Procedure Name Expression</listitem>
|
||||
<listitem>JdbcCallOperations Cache Statistics</listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
</section>
|
||||
<section id="2.2-tx">
|
||||
<title>Transaction Synchronization</title>
|
||||
<para>
|
||||
When running from a transactional poller,
|
||||
mail inbound adapters can be configured to update the mailbox only
|
||||
if the transaction commits.
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<section id="2.2-new-components">
|
||||
|
||||
Reference in New Issue
Block a user