Job很简单CSVtoDBFileWriter:
-
从oracle1读取CSV文件名和位置
-
读取CSV文件(批量读取器)
表中的 -
write(批处理编写器)(oracle2)
我有2个数据源:
- Oracle1
: available when application context loads and
: I read properties from Oracle1's tables to create oracle2
: jobRepository related tables should be stored here(oracle1)
- Oracle2 :Spring批处理编写器最终输出的目标数据库 .
问题1:我需要XA transactionManager吗?
问题2:我是否可以仅使用Spring Boot在 生产环境 环境中运行此应用程序, 生产环境 中是否存在使用Spring Boot的挑战?
1 回答
当SB元数据表存储在与用于数据写入的数据库不同的数据库中时,您只需要XA事务,因为必须同时存储检查点(数据和SB元数据)以处理同步和可重新启动 .
可以从不同的数据源完成读取而不会出现问题,因为读取与SB元数据的保存位置无关 .