Java Jberet,在batchlet上手动设置writecount
我想知道是否可以在batchlet上手动设置writecount属性,以便在STEP_EXECUTION.writecount字段的表上记录结果 这是我的伪代码Java Jberet,在batchlet上手动设置writecount,java,jsr352,jberet,jbatch,Java,Jsr352,Jberet,Jbatch,我想知道是否可以在batchlet上手动设置writecount属性,以便在STEP_EXECUTION.writecount字段的表上记录结果 这是我的伪代码 @Inject EntityManager entityManager; @Inject private Logger logger; @Transactional(Transactional.TxType.REQUIRED) public void executeQuery(String query) { final
@Inject
EntityManager entityManager;
@Inject
private Logger logger;
@Transactional(Transactional.TxType.REQUIRED)
public void executeQuery(String query) {
final int output = entityManager.createNativeQuery(query).executeUpdate();
logger.info("rows updated: {}", output);
}
步骤\u执行。表中的WRITECOUNT
列不适用于batchlet步骤。如果你给它设置了数据,它仍然毫无意义。但我认为,如果您在batchlet中以某种方式设置了该值,它将被持久化到作业存储库。Hmmm,这个答案听起来与我的类似问题有很大不同,因为我想做类似的事情,但JSR中缺少适当的支持。