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 Fri, 26 Jan 2007 09:55:23 GMT
Hi Clinton,

Our new application arhitecture will include Spring ... so finally we are 
going to use:
WebSphere (last version) + Spring + iBATIS (SQLMap) + Oracle

I think that Spring adoption will solve our problems ...

Best regards,
Cornel Antohi
Project Manager
KEPLER-ROMINFO

Phone:  +  40 21 233 10  80

CONFIDENTIALITY   NOTICE

The content of this   communication is   classified as KEPLER Group 
Confidential and  Proprietary   Information.The  content of this 
communication is  intended  solely for the use of  the  individual or entity 
to whom it  is  addressed and others authorized to   receive it. If you are 
not the   intended recipient you are hereby notified  that  any  disclosure, 
copying, distribution or taking any action in  reliance  on the   contents 
of this information is strictly prohibited and   may be  unlawful. If you 
have received this communication in  error, please   notify us immediately 
by  responding to this  communication then  delete it  from your system. We 
appreciate   your assistance in  preserving the  confidentiality of our 
correspondence. Thank  you.

----- Original Message ----- 
From: "Clinton Begin" <clinton.begin@gmail.com>
To: <user-java@ibatis.apache.org>
Sent: Thursday, January 25, 2007 10:38 PM
Subject: Re: Autocommit not properly handled in Ibatis.


> With Oracle, commitRequired should be set to false.
>
> Oracle is actually very well behaved with iBATIS.  It's just that
> commits/rollbacks are costly even when no changes were made.
>
> Your bigger concern is WebSphere....that has to be the craziest app
> server on earth.  I only hope you're using the latest version.  If
> you're using global/distributed transactions, make sure to use the
> EXTERNAL tranasction manager type. I think that's about it.
>
> Cheers,
> Clinton
>
> On 1/25/07, Cornel Antohi <cantohi@kepler-rominfo.com> wrote:
>> Great!
>>
>> We started to use iBATIS 1.5 years ago and we are really happy with it 
>> ...
>> but the most problematic thing until now was this AutoCommit = false in
>> WebSphere environment - now we are using commitRequired and indeed our
>> life is easier :)
>>
>> "Anyway, unless you're using Oracle, feel free to make your lives easier
>> by just setting commitRequired=true..  :-)" --> do you have any 
>> suggestion
>> for iBATIS + Oracle configuration?
>>
>> Thank you,
>> Cornel
>>
>> > No, absolutely not.  It will either make one start/commit/end per
>> > method call to SQLClient (if you don't start a transaction) or just
>> > one that you call explicitly.
>> >
>> > The only exception is if you're using Lazy Loading, but that's totally
>> > within your control.
>> >
>> > iBATIS always attempts to use the most efficient transaction scope
>> > possible.  So you shouldn't have to worry about it.
>> >
>> > Clinton
>> >
>> > On 1/25/07, Cornel Antohi <cantohi@kepler-rominfo.com> wrote:
>> >> Hi Clinton,
>> >>
>> >> Murphy's law is validated again: I am using Oracle :(
>> >>
>> >> If I am using in a method N SELECT queries with commitRequired=true,
>> >> iBATIS
>> >> makes N commit() (one at the end of each query), right? Do you have 
>> >> any
>> >> clue
>> >> / recommendation how to minimize this overhead using iBATIS + Oracle?
>> >>
>> >> Thank you,
>> >> Cornel
>> >>
>> >>
>> >> ----- Original Message -----
>> >> From: "Clinton Begin" <clinton.begin@gmail.com>
>> >> To: <user-java@ibatis.apache.org>
>> >> Sent: Thursday, January 25, 2007 6:55 PM
>> >> Subject: Re: Autocommit not properly handled in Ibatis.
>> >>
>> >>
>> >> > In hindsight I wish I had made the default commitRequired=true...
>> >> >
>> >> > I believe the only database that really suffers from unecessary
>> >> > commits is Oracle.  The other RDBMS are actually pretty good about

>> >> > not
>> >> > incurring additional overhead, and in fact Sybase drivers I've used
>> >> > demand that either commit or rollback be called in all cases except
>> >> > AutoCommit of course.
>> >> >
>> >> > Anyway, unless you're using Oracle, feel free to make your lives
>> >> > easier by just setting commitRequired=true..  :-)
>> >> >
>> >> > Clinton
>> >> >
>> >> > On 1/25/07, Cornel Antohi <cantohi@kepler-rominfo.com> wrote:
>> >> >>
>> >> >>
>> >> >> 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,
>> >> >> Cornel
>> >> >>
>> >> >>
>> >> >> ----- 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 ...
>> >> >> >
>> >> >> > Question:
>> >> >> > 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) :
>> >> >> sqlMapClient.startTransaction();
>> >> >> sqlMapClient..queryFor...();
>> >> >> sqlMapClient.commitTransaction();
>> >> >>
>> >> >> 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.
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >>
>> >>
>> >
>>
>> 


Mime
View raw message