ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Debasish Dutta Roy" <debasish.dutta...@gmail.com>
Subject Re: DAOManager Rollback problem
Date Wed, 14 Jun 2006 13:35:14 GMT
The problem that I am facing, is the first insert is completed and the
second one fails. The first one is not rolled back.
If I run in debug mode then I do see that the first record is inserted after
the first statement executes.

On 6/13/06, Brandon Goodin <brandon.goodin@gmail.com> wrote:
>
> It looks good to me. What exactly is the problem you are facing?
>
>
> On 6/13/06, Debasish Dutta Roy <debasish.duttaroy@gmail.com > wrote:
> >
> > I am having a problem with rollback. I use DaoManger and SQLMap.
> >
> > I have a business delegate who does like this:
> >
> > DAO1 dao1 = daoManager.getDAO(DAO1.class);
> > DAO2 dao2 = daoManager.getDAO(DAO2.class);
> > try {
> >       daoManager.startTransaction();
> >       dao1.firstTask();
> >       dao2.secondTask();
> >       daoManager.commitTransaction();
> > } catch (Exception e) {
> >    throw myException;
> > } finally {
> >    daoManager.endTransaction ();
> > }
> >
> >
> > my dao.xml is like this
> >
> >     <context>
> >         <transactionManager type="SQLMAP">
> >             <property name="SqlMapConfigResource" value="xml/sql-
> > map-config.xml "/>
> >         </transactionManager>
> >      ...........
> >      ...........
> >    </context>
> >
> > and the corresponding sql-map-config.xml
> >
> > <sqlMapConfig>
> >
> >     <transactionManager type="JDBC" commitRequired="true">
> >         <dataSource type="JNDI">
> >             <property name="DataSource"
> > value="java:comp/env/jdbc/MyDataSource"/>
> >         </dataSource>
> >     </transactionManager>
> >
> > Am I missing anything?
> >
>
>

Mime
View raw message