Results 1 to 3 of 3

Thread: split-flow processes executed as asyncTaskExecutor doesn't work a throttle-limit?

  1. #1
    Join Date
    Apr 2010
    Posts
    2

    Smile split-flow processes executed as asyncTaskExecutor doesn't work a throttle-limit?

    on my project, when i tried several flows in <split/>, found parraller processing do not work through throttle-limit.
    it looks like whole processes(flows) are working concurrently in a batch log.

    i am trying to execute 10 more flows in a split, but if whole flows are working concurrently,
    it could cause a db-connection pool issues.

    So is there anyway to adopt a throttle-limit in a split-flow asyncTaskExecutor?


    Code:
    <split id="split01" task-executor="asyncTaskExecutor">
    	<flow>
    		<step id="STEP30" parent="flowControlStep">
    			<tasklet ref="TSKLET01"/>
    		</step>
    	</flow>
    	<flow>
    		<step id="STEP31" parent="flowControlStep">
    			<tasklet ref="TSKLET02"/>
    		</step>
    	</flow>
    	<flow>....
    </split>
    Last edited by bumzpark; Jul 13th, 2012 at 03:50 AM.

  2. #2

    Default

    What version of Spring batch?
    Can I assume your attempting to throttle a SimpleAsyncTaskExecutor?
    If so, can you confirm that the Throttle is active? Maybe log out isThrottleActive() just to confirm the throttle is being applied.

    Jeff

  3. #3
    Join Date
    Apr 2010
    Posts
    2

    Default

    my project is using spring-batch-core-2.1.5.RELEASE.jar, org.springframework.core-3.0.2.RELEASE.jar.
    also asyncTaskExecutor is defined as
    <bean id="asyncTaskExecutor" class="org.springframework.core.task.SimpleAsyncTa skExecutor">

    So I added property to my job.xml as below

    <bean id="asyncTaskExecutorSplit" class="org.springframework.core.task.SimpleAsyncTa skExecutor">
    <property name="concurrencyLimit" value="4"/>
    <property name="threadNamePrefix" value="AsyncThread-"/>
    <property name="daemon" value="true"/>
    </bean>

    it works fine now,
    thanx visualjeff for reminding...
    Last edited by bumzpark; Jul 16th, 2012 at 12:39 AM.

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
  •