import javax.batch.api.*;
import javax.enterprise.context.*;
import javax.inject.Inject;
@BatchScoped
public class MyJob implements ItemReader, ItemProcessor, ItemWriter {
@Override
public void open(Serializable checkpoint) throws Exception {
}
@Override
public void close() throws Exception {
}
@Override
public Object readItem() throws Exception {
}
@Override
public void writeItems(List<Object> items) throws Exception {
}
@Override
public Object processItem(Object item) throws Exception {
}
@Inject
@BatchProperty
private String outputFilePath;
}
<job id="myJob" xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/jobXML_1_0.xsd">
<step id="step1">
<chunk item-count="100">
<reader ref="myJob" />
<processor ref="myJob" />
<writer ref="myJob" />
</chunk>
</step>
</job>