ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Devine, James" <james.dev...@fmr.com>
Subject RE: AutoCommit Defaulted to true/false?
Date Mon, 09 Jun 2008 20:00:15 GMT
Thanks Nathan.  I was also looking through this guide.  
On page 53, it states:
By default, calling any execute method on SqlMapClient instance (e.g.
queryForObject() or insert()) will
auto-commit or auto-rollback. This means that each call to any execution
method will be a single unit of
work. This is simple indeed, but not ideal if you have a number of
statements that must execute as a single
unit of work (i.e. either succeed or fail as a group). This is where
transactions come into play.
I don't currently have a transactionManager defined.  If needed, we will
likely use spring's tx manager.  
It sounds like auto-commit is true until you define a transaction
manager.  Do you agree?


	From: Nathan Maves [mailto:nathan.maves@gmail.com] 
	Sent: Monday, June 09, 2008 3:52 PM
	To: user-java@ibatis.apache.org
	Subject: Re: AutoCommit Defaulted to true/false?
	Taken from the Developer Guide located at
	The <transactionManager> element also allows an optional
attribute commitRequired that can be true or
	false. Normally iBATIS will not commit transactions unless an
insert, update, or delete operation has been
	performed. This is true even if you explicitly call the
commitTransaction() method. This behavior
	creates problems in some cases. If you want iBATIS to always
commit transactions, even if no insert, update, or delete operation has
been performed, then set the value of the commitRequired attribute to
	On Mon, Jun 9, 2008 at 11:57 AM, Devine, James
<james.devine@fmr.com> wrote:

		I am using iBatis for data access with a Sybase
database.  Our Sybase database is configured to run in "unchained" mode,
which basically means that autocommit must be set to true.

		I am trying to figure out the default behavior of iBatis
with respect to autocommit.  I thought that autocommit was set to false
by default.  

		However, when I execute this, I am getting back true: 

		- I thought that iBatis defaulted autocommit to false.
Is this not the case? 


View raw message