title: JDBC transaction for resultSet
body: <p>Do I need to start and commit transaction while iterate result set?</p>
  <p>like the following:</p>
  <pre><code>String query = ....;
  Connection con = ... // create the connection
  con.setAutoCommit(false);
  try (Statement stmt = con.createStatement()) {
    ResultSet rs = stmt.executeQuery(query);
    while (rs.next()) {
       //do things here
    }
  } catch (SQLException e) {
    // roll back
  }
  </code></pre>
  <p>I see that it does work without active transaction and I don't understand why.</p>