May be if we put some flag checks in java to comply to it. But in a multi clustered environment, how we can achieve this.
Put flags in DB and not in java.
An alternative is to put processed and unprocessed data in different tables.
Lets assume, you have a table T1 where new data is kept.
One process picks up the data ("select for update" insures that nobody else processes the data at the same time) from T1. On successful processing, it deletes the data from this table and adds it to the another table T2.
Since all your processes queries T1 and not T2, no data will be processed twice.
Make sure that you take a lock on the data using "Select for Update" so that no two processes process the same record concurrently.
[ July 03, 2008: Message edited by: Nitesh Kant ]