I have a logic that selects some rows from the database that have the status "Ready", as soon as I get a result set, I need to update the status to "processing" so that no other thread can access these rows. then I need to execute some logic in the records in the result set, and one processing is complete. I need to update the status of the record again to complete.
Questions: is there a way that I execute the select statement - at this time only I can simultaneously change the status of the rows returned in the result set.
can anyone suggest if there is a good way to implement it in java.
source share