I need to execute a select and then update some of the rows in the ResultSet
in an atomic way.
The code I am using looks like (simplified):
What happens if any other process has changed the database row that you are updating via updateRow() ? Is there any way to lock the rows in the ResultSet ?
In Oracle, you can kinda mark certain rows for update by issuing the following SQL.
select cola, colB from tabA for update;
The next transaction/thread/app that tries to update this row will get an exception. see this for more details -- http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:4530093713805