I created a simple ItemReader:
public class SimpleReader extends AbstractItemReader {
@Inject @BatchProperty
private String number;
@Inject
JobContext jobContext;
@Override
public Object readItem() throws Exception {
// .....
}
}
When I deploy this code to JBoss EAP 6 I get the following Injection Errors:
org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies
for type [String] with qualifiers [@BatchProperty] at injection point
[[field] @Inject @BatchProperty private ....SimpleReader.number]
org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies
for type [JobContext] with qualifiers [@Default] at injection point
[[field] @Inject ....SimpleWriter.jobContext]
If I understand correctly, Spring-Batch is not yet initialized, when Weld starts injecting. How can I initialize Spring-Batch, so that this injection works?