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 Rollback Issues
Date Thu, 15 Jun 2006 15:09:25 GMT
Hi All
Has anyone successfully tested rollback with DAOManager implementation.

I am unable to get it working.


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>

Mime
View raw message