简体   繁体   English

在春季批处理远程分区中,我们可以将主配置和从配置配置为单个配置,并将其作为单个程序运行

[英]In spring batch remote partitioning can we have the master and slave configuration as a single configuration and run it as a single program

I'm using remote partitioning for my project and I have 2 projects in eclipse, ie one is the master program and a separate one for the Slave. 我正在为项目使用远程分区,并且在eclipse中有2个项目,即一个是主程序,一个独立的用于Slave。 Instead of having 2 projects separately , Can I combine the slave and master to a single context and run, master and slave as a single Java process in my JVM? 可以将从属服务器和主服务器合并到单个上下文中,而不是将其单独包含2个项目,并在JVM中将其作为单个Java进程运行,运行吗?

Yes, that is the common pattern - with the master participating as one of the "slaves". 是的,这是常见的模式-主人作为“奴隶”之一参加。 If you don't need to distribute the work across multiple JVMs, the partitioning doesn't need to use an external broker; 如果您不需要跨多个JVM分配工作,则分区不需要使用外部代理。 see the batch integration test cases and in particular the vanilla one . 请参阅批处理集成测试用例 ,尤其是香草 测试用例

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM