集群环境上的Spring Batch-Websphere [英] Spring Batch on Clustered environment - Websphere
问题描述
我确实设置了spring Batch作业,它在单个JVM上运行良好.但是我需要将其部署到群集环境中.我正在使用Spring Task Scheduler来计划工作.有什么办法可以在集群环境中做到这一点,如果一个节点发生故障,另一节点应该接起它.要部署的服务器是Webspehere.
I did set up a spring Batch job, it runs fine on a single JVM. But I need it to be deployed on to a clustered environemnt. I am using spring task scheduler to schedule the job. Is there any way to do it on clustered environment, if one node is down the other should pick it up. Server to be deployed on is Webspehere.
推荐答案
两个建议:
- Quartz 数据库中的设置 通过 Apache Camel幂等仓库
- Quartz setup in the DB
- Hazelcast via Apache Camel Idempotent repository
这两种方法均可确保您的任务只需一次.
Both of these approaches will ensure your task is getting picked up just once.
第一种方法需要繁琐的Quartz DB设置,但是您可以直接连接未集群的Websphere Webapp.
The first approach requires the (tedious) Quartz DB setup but then you can connect your unclustered Websphere webapps directly.
第二种方法不需要持久存储,并且通过Apache Camel包装器可以轻松进行设置.
The second approach doesn't require persistent store and via the Apache Camel wrapper makes the setup a breeze.
这篇关于集群环境上的Spring Batch-Websphere的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!