how to run a job in same thread across JVM's in spring. the same job should not run multiple times. it should run only once.
Asked
Active
Viewed 101 times
0
-
Are you asking how to make sure that a piece of code that is identically deployed to multiple JVM runs only exactly once (in one randomly chosen JVM)? – Thilo Nov 10 '14 at 07:01
-
Sounds like you want to use a scheduler with cluster support. I believe Quartz can do that. http://stackoverflow.com/questions/5527548/using-quartz-in-a-clustered-environment?rq=1 – Thilo Nov 10 '14 at 07:02
-
yes, app is deployed in multiple JVM's and job should run only once. – Pavan Kumar Devulapalli Nov 10 '14 at 07:04
-
related: http://stackoverflow.com/questions/26402665/making-schedule-run-only-once-in-a-clustered-environment?lq=1 – Thilo Nov 10 '14 at 07:05