Write a simple spring batch/tasklet which will be called from four different servers at the same time(using quartz) but only one should succeed. All three servers will use the same database. Let's say "db_one". If one server is executing the spring batch and other two requests should skip. Basically whichever comes first, should execute the task and succeed. Spring batch task can be simple read one record from table A and writes to table B. If one server goes down, the same process should continue with other three servers.
Assume, all three servers are scheduled to call spring batch at every 5 min.
Tip, Spring batch has its own schema which supports these kind of futures. Spring batch provides DDL scripts also.
Technologies. Jdk1.6, SpringBatch 2.2.6, Spring 3.2.8
database, PostgreSQL 9.2
Should be maven project.
IDE - eclipse.
You can use quartz and cronexpression for scheduling spring batch and test it, but I don't need quartz code. I need only spring batch files and any related DDL scripts. (tables).
Example cronexpression,
*/5 * * * * ? - this cronexpression will trigger the job every 5 sec.
Note,
Don't use table or row level lock using query. Select * ...for update
Don't use machine IP address. Solution should be using spring batch and it's schema/tables.
If you give me this program before sunday(June,15th - 4 PM EST), I will pay bonus too!
Hello,
I'm an experienced java, J2EE web application developer.
I'm very happy to get this project done for you.
Ping me if you are interested.
Thanks,
Rick