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 16:33:56 GMT
Hi Koka,

In case of iBATIS commitRequired=false, if you execute SELECT statements,  they are grouped
into a transaction that "is terminated by a call to either the method commit or the method
rollback" ... because iBATIS never calls commit() or rollback() it means that iBATIS do not
handle properly the transactions, right?

Thank you,

  ----- Original Message ----- 
  From: Koka Kiknadze 
  To: user-java@ibatis.apache.org 
  Sent: Thursday, January 25, 2007 5:21 PM
  Subject: Re: Autocommit not properly handled in Ibatis.

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

    How do you interpret this fact?

  Not sure what kind of interpretation you ask for ;)

  Again, if the code looks like (you can leave out startTransaction / commitTransaction in
defaultAutocommit=true mode, as iBatis will internally add those for any SQL statement) :


  Underlying connection object's commit() method is NOT called if commitRequired property
is set to false (it would get called if it were insert/update etc.), and vice versa - connection.commit()
IS called if commitRequired = true. Setting commitRequired =false saves extra commit calls
when no data has changed.

View raw message