Spring Integration : How to guarantee the transaction two more jdbc-outbound-gateway?

前端 未结 1 1787
有刺的猬
有刺的猬 2020-12-11 12:28

I have the following pattern \"my

I have two kinds of databases. One is a int

1条回答
  •  青春惊慌失措
    2020-12-11 12:48

    Add a QueueChannel somewhere upstream (i.e. before the pub sub channel for tx2) and use a poller to start the transaction.

    Alternatively, insert a transactional gateway...

    
    
    
    
    public interface TX {
        @Transactional
        Message exchange(Message m);
    }
    

    You'll need to enable transactions in the second case.

    0 讨论(0)
提交回复
热议问题