有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

雅加达ee Java ee 7批处理API MultiResourceItemReader对应项

Spring Batch有一个方便的MultiResourceItemReader,我在Java EE 7 Batch Processing API中找不到类似的类。我想知道JavaEE7API是否包含类似的内容。或者,如果我可以使用其他Java EE服务实现流的预期行为:

流量:

  1. 计时器从中央数据库读取“拉请求”
  2. 它还将“拉请求”状态更新为“正在处理”
  3. 对于每个拉动请求
    1. 读取“拉请求”的源文件夹及其“目标数据库”
    2. 对于原始文件夹中的每个文件
      1. 在目标数据库的文件控制表中插入一个条目
      2. 逐行读取并插入文件内容(N行)
      3. 更新步骤2.1中写入的条目
      4. 将文件移动到新目录
    3. 调用目标数据库中的存储过程来验证和处理当前的“拉请求”文件
  4. 将中央数据库中的“拉取请求”状态更新为“已处理”

我可以为第一步和第二步编写EJB定时器。它会为每个请求触发一个批处理作业(它们可以并行运行)

但是我必须知道如何在没有^{的情况下实现3(特别是3.2)。我也不确定如何在步骤3的每个批处理作业完成后正确触发步骤4(在JavaSE环境中,我会使用CountDownLatch

有什么提示吗


共 (1) 个答案

  1. # 1 楼答案

    spring.ioSB 3.0发布

    JSR-352 does not provide any implementations of batch components. Spring Batch provides 17 readers, 16 writers and countless other utilities and extensions that have been tested for years in enterprise production environments. Spring Batch provides scalability options beyond a single JVM. Finally Spring Batch provides big data support both through the Spring for Apache Hadoop project and as a cornerstone of Spring XD.

    To read more about Spring Batch's implementation of JSR-352, visit our reference documentation here: http://docs.spring.io/spring-batch/trunk/reference/html/jsr-352.html