ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cornel Antohi" <cant...@kepler-rominfo.com>
Subject Re: Autocommit not properly handled in Ibatis.
Date Thu, 25 Jan 2007 07:33:54 GMT

Thank you so much for your explanations!

iBATIS always setAutoCommit(false).
If you execute only SELECT statements and forceCommit is set to false, then no commit() or
rollback() is executed by iBATIS.

".... Otherwise, its SQL statements are grouped into transactions that are terminated by a
call to either the method commit or the method rollback."

In iBATIS SELECT case, no commit or rollback is executed ...

How do you interpret this fact?

Thank you,

  ----- Original Message ----- 
  From: Koka Kiknadze 
  To: user-java@ibatis.apache.org 
  Sent: Tuesday, January 23, 2007 12:11 PM
  Subject: Re: Autocommit not properly handled in Ibatis.

    iBATIS always commits or rolls back transactions explicitly with
    commit() and rollback(). 


  IJust to spare someone's time  I'd like to add that it is only true if
  1. Threre were some insert/update/delete or procedure calls after startTransaction()
  2. The forceCommit (commitRequired) property is set to true 

  I.e. if, after startTransaction(), only select statements are executed and forceCommit is
set to false, no commit is issued to the database even if you call commit in iBatis.
  I've lost couple of hours until Jeff explained that to me and I hope I got it right. 

View raw message