ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clinton Begin <clinton.be...@gmail.com>
Subject Re: Question about transactions.
Date Fri, 18 Mar 2005 17:56:55 GMT
Mark,

Be sure to set <transactionManager ... commitRequired="true">


....I think I'm going to make this the default in a future release.

Cheers,
Clinton


On Fri, 18 Mar 2005 09:42:05 -0800 (PST), Mark Alcocer Flores
<superpchead@yahoo.com> wrote:
> Actually, this is what I am doing now.I changed all my
> calls to this format. Could there be any other method
> that I can call or anything else that I can do?
> 
> I dont know if it migth be the database i use. It is
> an AS/400 mainframe.
> 
> Anyway, thanks for the advice, but if anything else
> ocurrs to you, please let me know.
> 
> Mark.
> 
> --- Brandon Goodin <brandon.goodin@gmail.com> wrote:
> > using the following format will work. If your sql
> > fails before commit
> > the end transaction will call rollback.
> >
> > try{
> >   startTransaction
> >   ... code goes here
> >   commitTransaction
> > } finally {
> >   endTransaciton
> > }
> >
> > Brandon
> >
> > On Fri, 18 Mar 2005 09:18:18 -0800 (PST), Mark
> > Alcocer Flores
> > <superpchead@yahoo.com> wrote:
> > > I have a problem. I recently upgraded from the 1.2
> > > iBatis version to the new 2.0 iBatis version.
> > Because
> > > of the database I connect to, I controled
> > transactions
> > > manually. I use the startTransaction method to
> > start
> > > the transaction and commitTransaction to commit
> > it. If
> > > anything went wrong I used the rollbackTransaction
> > to
> > > leave the database in a consistent state. In this
> > new
> > > version os iBatis the rollbackTransaction method
> > is
> > > not public and instead, the endTransaction method
> > must
> > > be use, actually I call it always in a finally
> > > statement.
> > >
> > > The thing is that when there is an error in the
> > > database, in the old way, the connection close
> > with
> > > not problems and everything was alrigth, but with
> > the
> > > new way, the state of the database is inconsistent
> > > sometimes and the connection remains open.
> > >
> > > Can anyone give me an idea of what can I do? I
> > think i
> > > could go back to the old version, but this new
> > version
> > > has so many good features that i wouldn't want to
> > > leave  them.
> > >
> > > Thanks in advance.
> > >
> > > Mark.
> > >
> > > The Greatest Thing You'll Ever Learn
> > > It's Just To Love And Be Loved In Return
> > >
> > >
> >
> 
> The Greatest Thing You'll Ever Learn
> It's Just To Love And Be Loved In Return
> 
>

Mime
View raw message