title: spring integration JDBC DB-Poller. How to implement Row-Mapper to recieve rows to Task activator
body: <p>Please see link :</p>
  
  <p><a href="https://stackoverflow.com/questions/15251692/spring-integration-inbound-channel-adapter-update-query-parameter-exception-whe">Spring Integration: Inbound-channel-adapter update query parameter exception when using RowMapper</a></p>
  
  <p>I am doing similar config, but not sure how to use row-mapper with splitter.</p>
  
  <p>I am trying to create a db-poller and expecting to receive incoming rows in service-activator using row-mapper, but messages are not reaching there..</p>
  
  <p>Here is my configuration. Please advise.</p>
  
  <h2>My config:</h2>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  &lt;beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:tx="http://www.springframework.org/schema/tx" xmlns:p="http://www.springframework.org/schema/p"
      xmlns:task="http://www.springframework.org/schema/task" 
      xmlns:util="http://www.springframework.org/schema/util"
      xmlns:aop="http://www.springframework.org/schema/aop"
      xmlns:context="http://www.springframework.org/schema/context"
      xmlns:int="http://www.springframework.org/schema/integration"
      xmlns:int-jdbc="http://www.springframework.org/schema/integration/jdbc" 
      xmlns:jdbc="http://www.springframework.org/schema/jdbc"
      xsi:schemaLocation="http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc.xsd
          http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
          http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
          http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
          http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd
          http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd
          http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
          http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
          http://www.springframework.org/schema/integration/jdbc http://www.springframework.org/schema/integration/jdbc/spring-integration-jdbc-3.0.xsd"&gt;
  
      &lt;context:component-scan base-package="com.checkfree.isolutions" /&gt;
  
      &lt;int-jdbc:inbound-channel-adapter id="invoiceInbound" query="select * from invoice where status = '0'" auto-startup="true"
        channel="invoiceInboundChannel" data-source="dataSource" row-mapper="rowMapper"
        update="update invoice set status = 'PROCESSED' where id in (:id) " max-rows-per-poll="1"&gt;
          &lt;int:poller max-messages-per-poll="1" fixed-rate="10000"&gt;
          &lt;int:transactional transaction-manager="transactionManager" 
                  isolation="DEFAULT"
                  propagation="REQUIRED" 
                  read-only="false" 
                  timeout="1000"/&gt;
          &lt;/int:poller&gt;
      &lt;/int-jdbc:inbound-channel-adapter&gt;
  
      &lt;!-- Add RowMapper tag : row-mapper="rowMapper" --&gt;
  
      &lt;bean id="rowMapper" class="com.checkfree.isolutions.InvoiceMapper"&gt;&lt;/bean&gt;
  
      &lt;int:chain input-channel="invoiceInboundChannel" output-channel="filteredChannel"&gt;
              &lt;int:splitter ref="invoiceSplitter" /&gt;
      &lt;/int:chain&gt;
  
      &lt;int:channel id="filteredChannel" /&gt;    
  
      &lt;int:service-activator id="taskActivator" input-channel="filteredChannel" ref="taskCreator"  method="processInvoice"&gt;
      &lt;/int:service-activator&gt;
  
  
  &lt;/beans&gt;
  </code></pre>
  
  <h2>Here is my service activator :</h2>
  
  <pre><code>@Component("taskCreator")
  public class TaskCreator {
  
      static Logger logger = Logger.getLogger(TaskCreator.class.getName());
  
      @Autowired
      InvoiceService invoiceService;
  
      @Transactional(readOnly = false)
      public void processInvoice(Object invoiceObj) throws Exception {
          System.out.println("row received.." + invoiceObj.getClass().getCanonicalName());
      }
  }
  </code></pre>
  
  <p>I am not able to see print message "row received.." in console.</p>
  
  <p>But in debug rowmapper's is mapRow method is getting called with each invocation.</p>
  
  <pre><code>public class InvoiceMapper implements RowMapper {
  
      @Override
      public Invoice mapRow(ResultSet rs, int rowNum) throws SQLException {
  
          Invoice invoice = new Invoice();
           --
           --
      }
  }
  </code></pre>
  
  <p>What I trying to achieve is that my TaskCreator should receive incoming table row in row-mapper (InvoiceMapper) format. </p>
  
  <p>I just corrected my config. </p>
  
  <p>When I switch on debug I can see control going to RowMapper.</p>
  
  <p>Question: I dont know how to use row-mapper with spiltter. can anybody give any example..</p>
  
  <p>Can you please advise. Thanks in advance..</p>
  
  <p>Regards, Shiv</p>