I have an java application reading from a database table for jobs to process, and I may have multiple instances of this application running on different servers as each job is i
if you want to ensure proper work in concurrent environment in your specific example you can use the server name.
The table will look like:
JobID JobName Server Status
----- ------- ------- ---------
1 Job_A host-1 Completed
2 Job_A host-2 Working
3 Job_B host-3 Working
if you have multiple instances on the same host add the process id too:
JobID JobName Server ProcessID Status
----- ------- ------- ---------- ---------
1 Job_A host-1 1000 Completed
2 Job_A host-2 1000 Working
3 Job_A host-2 1001 Working
5 Job_B host-3 1000 Working