Results 1 to 4 of 4

Thread: Inbound-Gateway and spanning transactions

  1. #1
    Join Date
    May 2011
    Posts
    3

    Default Inbound-Gateway and spanning transactions

    Hi!

    I have difficulties configuring a "spanning" transaction, i.e. a transaction spanning over multiple services.
    Currently each service is transactional but it is not enough in some cases.

    Ex:
    Jms:InboundGateway -> ServiceActivatorA -> SerivceActivatorB
    An error in ServiceB should cause a rollback of the entire process and thereby undo serviceA work.

    I want the same functionality as the transactional element in a poller:
    Code:
    <si:poller cron="0 0 4 1 * ?">
        		
        		<si:transactional transaction-manager="txManager" 
                       isolation="DEFAULT"
                       propagation="REQUIRED" 
                       read-only="false" 
                       />
       	</si:poller>

    Any tips about how I can solve this issue?

  2. #2
    Join Date
    Jan 2009
    Location
    Ukraine, Kharkov
    Posts
    632

    Default

    Hello.
    Show your channels configuration, please
    poller work only on asynchronous channels.
    So, you must enclose your executiong thread in transaction.

    Artem

  3. #3
    Join Date
    Mar 2010
    Location
    Gtr Philadelphia, PA
    Posts
    2,017

    Default

    See http://forum.springsource.org/showthread.php?109095

    Although that poster used a chain, the same technique will work in your case.
    Gary P. Russell
    Spring Integration Team
    SpringSource, a division of VMware

  4. #4
    Join Date
    May 2011
    Posts
    3

    Default

    Thank you, it works fine using a transactional gateway

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •