Announcement Announcement Module
No announcement yet.
ConcurrentTaskExecutor Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • ConcurrentTaskExecutor

    currently i have a job configured as below

    <step id="step1" parent="parentStep">
    <tasklet task-executor="taskExecutor">
    <chunk reader="reader" processor="processor" writer="writer"/>

    and i had task-executor referenced to below with poolSize = 40 etc.,

    <bean id="taskExecutor"
    class="org.springframework.scheduling.concurrent.T hreadPoolTaskExecutor"/>

    when i have the above Job was getting interrupted with JobInterruptedException at some point(couldn't figure out why may be cause of the poolSize ?), so i changed to step executor refer to

    <bean id="taskExecutor" class="org.springframework.scheduling.concurrent.C oncurrentTaskExecutor"/>

    now its fine but very slow in completing the Job,

    If i use ThreadPoolTaskExecutor what is the recommended pool size configuration or how do i speed up the job with

    thanks in advance,


  • #2
    In this case, If am right, I think multiple instances of the same job are trying to run in parallel. So instance 1 of the job is being interrupted by successive instances that have been invoked by the task executor. Since you took out the pool size and allowed it to be the default of 1, the problem disappeared but you ended up in the slow run of the job.

    Alternative would be to configure the pool size in the scheduler and not in the job launcher unless you need the parallel runs of the same job. Check out whether that would work and do keep us posted