ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Poitras Christian" <Christian.Poit...@ircm.qc.ca>
Subject RE: iBATIS, Spring, and transactions...
Date Tue, 10 Apr 2007 14:01:09 GMT
Here is my config file for Spring. It uses transaction with annotation.
@Transactional can be put before method or class declaration to make the
method/class transactional. (see Spring documentation for more details).

    <!-- Transaction handling -->
    <tx:annotation-driven transaction-manager="txManager"/>
    <bean id="txManager"
        <property name="dataSource" ref="dataSource"/>
    <!-- Initialize iBATIS -->
    <bean id="dataSource"
class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
        <property name="driverClassName" value="${driver}"/>
        <property name="url" value="${url}"/>
        <property name="username" value="${username}"/>
        <property name="password" value="${password}"/>
    <bean id="sqlMapClient"
        <property name="configLocation"
        <property name="dataSource" ref="dataSource"/>

    <!-- Initialize DAOs -->
    <bean id="aliasGroupDao"
        <property name="sqlMapClient" ref="sqlMapClient"/>

I have to say that it would be really nice to have an "how to" for
passing from iBATIS DAO to Spring DAO...
I made a french document about that question. I could transalte it to
english in the next weeks and put it on the wiki...


-----Original Message-----
From: Meindert [mailto:meindert@pastelebusiness.com] 
Sent: Tuesday, 10 April 2007 04:52
To: user-java@ibatis.apache.org
Subject: RE: iBATIS, Spring, and transactions...

Hi All,

Does anybody have an answer on the question posted below?
I want to switch of from IBATIS DAO to spring because IBATIS DAO is
I can convert most of the code quite simply, but what must I do with my

Kind Regards

-----Original Message-----
From: Brendan.McKenna@mdsuk.com [mailto:Brendan.McKenna@mdsuk.com]
Sent: 03 April 2007 07:15 PM
To: user-java@ibatis.apache.org
Subject: iBATIS, Spring, and transactions...


        Another newbie question.

        If I am implementing DAOs using Spring's iBATIS support, am I
required to also use Spring's transaction controls, or can I still use
the startTransaction(), commitTransaction() and endTransaction() calls
supplied by iBATIS?  If I can, I'm afraid that it's not clear to me how
to specify that I want to do this in the relevant XML configuration



View raw message