您的位置:首页 > 编程语言 > Java开发

Spring+quartz实现集群任务调度

2016-02-25 13:47 495 查看
Spring+quartz实现集群任务调度

关键点:

quartz中的主要实现类:

JobStoreTX

通过数据库锁(行锁)来实现多个节点的访问顺寻控制。

例如mysql:

select * from QRTZ_LOCKS t where t.lock_name='TRIGGER_ACCESS' for update


锁定当前行(t.lock_name为主键,具体参见mysql innodb表所行锁)。其它数据库访问该行的会话只能阻塞等待锁的释放。

quartz的 svn 地址(可以下载查看源码、具体的见表sql):
http://svn.terracotta.org/svn/quartz
参考 :

 http://tech.meituan.com/mt-crm-quartz.html
http://shmilyaw-hotmail-com.iteye.com/blog/2169156 http://www.tuicool.com/articles/B3qeUrB http://blog.csdn.net/gyb2013/article/details/7415502 http://ismezy.iteye.com/blog/1564076 http://www.quartz-scheduler.org/documentation/quartz-2.2.x/quick-start
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  quartz spring 集群