Results 1 to 4 of 4

Thread: Splitter Issue

  1. #1
    Join Date
    Jul 2006
    Location
    London
    Posts
    500

    Default Splitter Issue

    Split result not being picked up by Aggregator listening to splitter output channel.

    I have a service-activator which returns a List<MyObject>.

    This list is picked up by a splitter. The splitter just returns the input.

    The split output channel is input to an aggregator which has a custom correlation and release strategy.

    For some reason if I include the splitter the release strategy is never entered. I can write some extra code to get round this in the release strategy but would prefer to use the splitter.

    As far as I understand the splitter should result in 3 messages and 3 isComplete calls on the release strategy, but none occur.

    1 does occur if the splitter is removed but the message payload is a List of 3 items...I have other sources which determine the complete state so would prefer the payload type to be the same.

    Code:
    public List<MyObject> split(List<MyObject> list) 
        {
            return list;
        }
    Code:
    <si:channel id="in"/>
    <si:channel id="out"/>
        
        <si:splitter
            ref="sb"
            method="split"
            input-channel="in"
            output-channel="out"/>
            
        <bean
            id="sb"
            class="Splitter">
        </bean>
    
    <si:aggregator 
            ... 
            input-channel="out"
            ...
     />
    Last edited by jamesclinton; Jul 21st, 2011 at 11:20 AM.
    Regards,
    James

  2. #2
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,840

    Default

    Can you show the configuration of the splitter element?

    By the way, if you are just expecting a Collection or array, you don't need a method to be invoked by the splitter, you can just use <splitter> without any ref/method or expression attributes, and it will handle the Collection or array by default.

    -Mark

  3. #3
    Join Date
    Jul 2006
    Location
    London
    Posts
    500

    Default

    Hi Mark
    Some config added.
    Will try your suggestion.
    Regards,
    James

  4. #4
    Join Date
    Jul 2006
    Location
    London
    Posts
    500

    Default

    Some further information.

    The correlation strategy is fired 3 times as expected, but no hits on the release strategy.
    Regards,
    James

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
  •