集群环境上的Spring Batch-Websphere [英] Spring Batch on Clustered environment - Websphere

查看:124
本文介绍了集群环境上的Spring Batch-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.

推荐答案

两个建议:

  1. Quartz 数据库中的设置
  2. 通过 Apache Camel幂等仓库
  1. Quartz setup in the DB
  2. 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆