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
Lock the table using whatever mechanism is supported by your database server.
For example, in Postgres it would be:
LOCK yourtable;
And it's your table for the duration of the transaction.
Other databases will have something similar.