Results 1 to 2 of 2

Thread: Inbound Channel Adapter Poller

  1. #1
    Join Date
    Sep 2010
    Posts
    1

    Default Inbound Channel Adapter Poller

    Hi,
    I have an Inbound Channel Adapter which read datas from a Database every 100 ms:

    <int:inbound-channel-adapter auto-startup="false"
    ref="dbAdpater"
    method="getNextMessagesToProcess" channel="processChannel" >

    <intoller task-executor="dbThreadPoolExecutor">
    <int:interval-trigger interval="100" />
    <int:transactional transaction-manager="transactionManager"
    propagation="REQUIRED" />
    </intoller>
    </int:inbound-channel-adapter>

    <int:thread-pool-task-executor id="dbThreadPoolExecutor" max-size="10"/>

    With this configuration, I expected to have up to 10 threads running in parrallel where each thread are running within is own Transaction. I'm right?

    When I let this running, I get following exception:

    [task-scheduler-2] ERROR org.springframework.integration.handler.LoggingHan dler - org.springframework.core.task.TaskRejectedExceptio n: Executor [java.util.concurrent.ThreadPoolExecutor@1e67a57] did not accept task: org.springframework.integration.util.ErrorHandling TaskExecutor$1@113f917; nested exception is java.util.concurrent.RejectedExecutionException

    Can you tell what's wrong?

  2. #2
    Join Date
    Oct 2007
    Location
    London, England
    Posts
    108

    Default

    Are you defining a default poller anywhere else? Maybe with rejection-policy="ABORT"?

    A long shot but this might cause this if the poll is slow since the default behaviour of your dbThreadPoolExecutor when it has more than ten tasks will be caller runs.
    Jonas Partner
    OpenCredo

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
  •