title: Update more than one row atomically
body: <p>I need to execute a select and then update some of the rows in the <code>ResultSet</code> in an atomic way.</p>
  
  <p>The code I am using looks like (simplified):</p>
  
  <pre><code>stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
  rs = stmt.executeQuery("SELECT ...");
  
  while (rs.next()) {
      if (conditions_to_update) {
          rs.updateString(...);
          rs.updateRow();
      }
  }
  </code></pre>
  
  <ul>
  <li>Can I guarantee that the updates are going to be executed atomically ?  If not, how could I assure that ?</li>
  <li>What happens if any other process has changed the database row that you are updating via <code>updateRow()</code> ?  Is there any way to lock the rows in the <code>ResultSet</code> ?</li>
  </ul>