Results 1 to 5 of 5

Thread: TCP Collaborative Adapters

Threaded View

  1. #1

    Default TCP Collaborative Adapters

    Here is my flow :

    Scenario 1:
    XML => TCP Gateway -> XmlTransformer -> Splitter [with Dispatcher] -> Service Activator[Parallel Treatment] -> Aggregator -> XmlTransformer -> Return to Gateway.

    Scenario 1:
    XML => TCP Inbound Adapter -> XmlTransformer -> Splitter [with Dispatcher] -> Service Activator[Parallel Treatment] -> Aggregator -> XmlTransformer -> TCP Outbound Adapter.

    In both of my scenario, I have problems after the aggregator.

    In scenario 1, the reply channel is a temporary channel for the gateway return value. It bypasses, the last XML Transformer.

    In scenario 2, the aren't any reply channel set and I get the following exception after aggregation : org.springframework.integration.MessageHandlingExc eption: java.lang.IllegalArgumentException: no outputChannel or replyChannel header available.

    I've tried to set it with header-enricher, without success.

    Here is my context [for scenario 2]:
    Code:
    <ip:tcp-inbound-channel-adapter channel="tcpChannel" connection-factory="server"/>
    <ip:tcp-outbound-channel-adapter channel="replyChannel" connection-factory="server"/>
    
    <chain input-channel="tcpChannel" output-channel="parallelTxChannel"  >
       <service-activator ref="tcpProcess" method="process" />	
    </chain>
    	
    <chain input-channel="parallelTxChannel" output-channel="replyChannel">
    	<splitter ref="splitterBean" />
    	<service-activator ref="timerBean" />
    	<service-activator ref="aggregatorBean" />
    	<service-activator ref="xmlTransformer"/>	
    </chain>
    
    
    <channel id="parallelTxChannel">
    	<dispatcher task-executor="asmTxExecutor"/>
    </channel>
    
    <task:executor id="asmTxExecutor" pool-size="2"/>
    
    <beans:bean id="aggregatorBean" class="org.springframework.integration.aggregator.CorrelatingMessageHandler">
      <beans:constructor-arg>
    	<beans:bean class="com.ibm.brmt.ats.MessageGroupProcessorImpl"/>
      </beans:constructor-arg>
    </beans:bean>
    ---------------------------------------------------------------------

    Any idea why I get this exception after aggregation and why it's not chained to the last xml Transformer?

    Also, the documentation says we should prefer collaborative adapters (Scenario 2) to gateway (Scenario 1)... So i have tried it thinking it would solve my problem, is that a good avenue?

    The whole flow is not a transaction, the flow handles multiples parallel independent of each other transactions. Is that what you call nested transaction?

    Any help would be greatly appreciated!!
    Last edited by Olivier Quirion; Mar 29th, 2011 at 11:27 AM.

Tags for this Thread

Posting Permissions

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