ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Butler" <jeffgbut...@gmail.com>
Subject Re: transaction help please-exception
Date Tue, 18 Jul 2006 16:49:36 GMT
I think it might help to see some of your code...are you using DAO or not?
I wasn't sure from your previous posts.  SqlMapClient calls should look like
this:

try {
  sqlMap.startTransaction();
  sqlMap.insert(...);
  sqlMap.update(...);
  sqlMap.commitTransaction();
} finally {
  sqlMap.endTransaction();
}

Also, please see this page for information about configuring iBATIS on
WebSphere:

http://opensource.atlassian.com/confluence/oss/display/IBATIS/Environment+Specific+Information

Jeff Butler



On 7/18/06, Bing Lu <mfcplus@yahoo.com> wrote:
>
> btw, the application server is websphere 5.1 and I've
> specified the jndi datasource and have a
> transactionmanger="jdbc", can anyone tell me what i'm
> doing wrong?
>
> thanks
> --- Bing Lu <mfcplus@yahoo.com> wrote:
>
> > I'm trying the sqlmapclient.starttransaction,
> > committrasaction for now. but it's giving me the
> > following exception can anyone tell me what i might
> > be
> > doing wrong? And I did call
> > sqlmapclient.starttransaction
> >
> > thanks
> >
> > com.ibatis.common.jdbc.exception.NestedSQLException:
> > Could not commit transaction.  Cause:
> >
> com.ibatis.sqlmap.engine.transaction.TransactionException:
> > TransactionManager could not commit.  No transaction
> > is started.
> > Caused by:
> >
> com.ibatis.sqlmap.engine.transaction.TransactionException:
> > TransactionManager could not commit.  No transaction
> > is started.
> > [7/18/06 10:57:18:969 EDT] 63967dea SystemErr     R
> > at
> >
> com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.commitTransaction(
> SqlMapExecutorDelegate.java:761)
> > [7/18/06 10:57:18:969 EDT] 63967dea SystemErr     R
> > at
> >
> com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.commitTransaction(
> SqlMapSessionImpl.java:133)
> > [7/18/06 10:57:18:969 EDT] 63967dea SystemErr     R
> > at
> >
> com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.commitTransaction(
> SqlMapClientImpl.java:110)
> >
> > --- "Mkhitaryan, Aram"
> > <Aram.Mkhitaryan@lycos-europe.com> wrote:
> >
> > > Hi,
> > >
> > > Try this:
> > >
> > > try {
> > > daoManager.startTransaction();
> > > ....
> > > //Delete
> > > //Insert
> > > ...
> > > daoManager.endTransaction();
> > > } finally {
> > > daoManager.endTransaction();
> > > }
> > >
> > > Best,
> > > Aram
> > >
> > > -----Original Message-----
> > > From: Bing Lu [mailto:mfcplus@yahoo.com]
> > > Sent: Tuesday, July 18, 2006 1:24 AM
> > > To: user-java@ibatis.apache.org
> > > Subject: transaction help please
> > >
> > > Hi, how do I do a delete&insert operation in one
> > > transaction in ibatis? do I need to specify
> > anything
> > > in the transactionManager for this?
> > >
> > > thanks
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Tired of spam?  Yahoo! Mail has the best spam
> > > protection around
> > > http://mail.yahoo.com
> > >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> > protection around
> > http://mail.yahoo.com
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>

Mime
View raw message