Announcement Announcement Module
Collapse
No announcement yet.
instances of item reader/writer Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • instances of item reader/writer

    I have following code:
    Code:
    <batch:step id="bench">
    		<batch:tasklet task-executor="asyncExecutor" throttle-limit="8">
    			<batch:chunk reader="hadoopreader" commit-interval="100"
    				writer="hadoopwriter" cache-capacity="100"
    				processor-transactional="false" processor="solrbench">
    			</batch:chunk>
    		</batch:tasklet>
    </batch:step>
    how many instances of item reader, writer, processor are created? 8 or just one reused by multiple threads because "hadoopreader" bean is scope="step"? If i want multiple instances, will scope="prototype" on itemprocessor help?

  • #2
    You'll get one instance of the ItemReader/ItemProcessor/ItemWriter. Spring Batch does not create new instances per thread. Using prototype won't change that either. What are you attempting to accomplish?

    Comment

    Working...
    X