Results 1 to 2 of 2

Thread: ConcurrentTaskExecutor

  1. #1
    Join Date
    Aug 2009
    Posts
    25

    Default 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"/>
    </tasklet>
    </step>

    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
    ConcurrentTaskExecutor

    thanks in advance,

    DP

  2. #2
    Join Date
    Mar 2010
    Location
    USA
    Posts
    119

    Default

    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

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
  •