title: Spring integration: difficulty with transaction between 2 activators
body: <p>I have this use case.</p>
  
  <p>First chain:</p>
  
  <pre><code>&lt;int:chain input-channel="inserimentoCanaleActivate" output-channel="inserimentoCanalePreRouting"&gt;      
      &lt;int:service-activator ref="inserimentoCanaleActivator" method="activate" /&gt;                
  &lt;/int:chain&gt;
  </code></pre>
  
  <p>This is the relative code:</p>
  
  <pre><code>@Override
  @Transactional(propagation = Propagation.REQUIRES_NEW)
  public EventMessage&lt;ModificaOperativitaRapporto&gt; activate(EventMessage&lt;InserimentoCanale&gt; eventMessage) {
      ...
      // some Database changes
      dao.save(myObject);
  }
  </code></pre>
  
  <p>All is working great.</p>
  
  <p>Then I have another chain:</p>
  
  <pre><code>&lt;int:chain id="onlineCensimentoClienteChain" input-channel="ONLINE_CENSIMENTO_CLIENTE" output-channel="inserimentoCanaleActivate"&gt;
      &lt;int:service-activator ref="onlineCensimentoClienteActivator" method="activate" /&gt;
      &lt;int:splitter expression="payload.getPayload().getCanali()" /&gt;
  &lt;/int:chain&gt;
  </code></pre>
  
  <p>And the relative activator:</p>
  
  <pre><code>@Override
  public EventMessage&lt;CensimentoCliente&gt; activate(EventMessage&lt;CensimentoCliente&gt; eventMessage) {
      ...
      // some Database changes
      dao.save(myObject);
  }
  </code></pre>
  
  <p>The <code>CensimentoCliente</code> payload as described below has a <code>List</code> of payload of the first chain, so with a splitter I split on the list and reuse the code of the first chain.</p>
  
  <pre><code>public interface CensimentoCliente extends Serializable {
  
      Collection&lt;? extends InserimentoCanale&gt; getCanali();
  
      void setCanali(Collection&lt;? extends InserimentoCanale&gt; canali);
      ...
  }
  </code></pre>
  
  <p>But since every activator gets his transaction definition (since the first one can live without the second one) I have a use case where the transactions are separated.</p>
  
  <p>The goal is to have the db modifies of the two chains been part of the same transaction.</p>
  
  <p>Any help?</p>
  
  <p>Kind regards
  Massimo</p>