Re: Is statement.executeBacth() a transaction?




Did you read my answer that you quoted?
Well, it seems that either I did not get your explanation or you did
not make it clear enough. I appreciate your time and effort in the
usenet, but it does not help by sentences as this.


If you set auto-commit to 'false', nothing happens automatically.
That is the whole point of setting auto-commit to 'false'.

In my example above, I did set autocommit to false and use the
commit() explicitly. The question is that, in case first update runs
fine and SQLException is thrown for the second "update", will the jdbc
automatically rollback to the situation before the transaction,
(meaning rollback/wipe-out the first update), or should I do it
manually in the catch by calling rollback()? I do not think either
your post or the article gives a clear answer for this or maybe I just
missed the point somewhere.

.