class InfiniteLoopWriter implements StepExecutionListener, ItemWriter<Object> {

	private static final Log LOG = LogFactory.getLog(InfiniteLoopWriter.class);

	private StepExecution stepExecution;

	private int count = 0;

	/**
	 * @see org.springframework.batch.core.StepExecutionListener#beforeStep(StepExecution)
	 */
	@Override
	public void beforeStep(StepExecution stepExecution) {
		this.stepExecution = stepExecution;
	}

	public InfiniteLoopWriter() {
		super();
	}

	@Override
	public void write(Chunk<?> items) throws Exception {<FILL_FUNCTION_BODY>}

}

		try {
			Thread.sleep(500);
		}
		catch (InterruptedException e) {
			Thread.currentThread().interrupt();
			throw new IllegalStateException("Job interrupted.", e);
		}

		stepExecution.setWriteCount(++count);
		if (LOG.isInfoEnabled()) {
			LOG.info("Executing infinite loop, at count=" + count);
		}
	
<no_super_class>