Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 86208 invoked from network); 13 Jun 2006 20:04:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 13 Jun 2006 20:04:09 -0000 Received: (qmail 73671 invoked by uid 500); 13 Jun 2006 20:04:08 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 73226 invoked by uid 500); 13 Jun 2006 20:04:07 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 73210 invoked by uid 99); 13 Jun 2006 20:04:06 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Jun 2006 13:04:06 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,RCVD_IN_BL_SPAMCOP_NET,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of debasish.duttaroy@gmail.com designates 66.249.92.174 as permitted sender) Received: from [66.249.92.174] (HELO ug-out-1314.google.com) (66.249.92.174) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Jun 2006 13:04:05 -0700 Received: by ug-out-1314.google.com with SMTP id s2so678030uge for ; Tue, 13 Jun 2006 13:03:44 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=lHt1BECr4k2ZmQBNdzapS3/1XQ0Cr9BLaREgf/a9bbkF2pWjoey5VExCe3lobnBaV4t+AUphsE4NDULniCd4X7q1OzrRsQ8SdZ6F2sZAyxxkYE3h4FdlsnMiGQCV8iCYVRnEGqDypwuSNHQsri2datYIhwZhVP96ZzUuaNbkJ2E= Received: by 10.66.222.9 with SMTP id u9mr6649143ugg; Tue, 13 Jun 2006 13:03:44 -0700 (PDT) Received: by 10.66.220.11 with HTTP; Tue, 13 Jun 2006 13:03:44 -0700 (PDT) Message-ID: <3c8cea400606131303k53bbf4ecs1fa276d0908eda52@mail.gmail.com> Date: Tue, 13 Jun 2006 16:03:44 -0400 From: "Debasish Dutta Roy" To: user-java@ibatis.apache.org Subject: DAOManager Rollback problem MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_10645_28428054.1150229024209" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_10645_28428054.1150229024209 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 ........... ........... and the corresponding sql-map-config.xml Am I missing anything? ------=_Part_10645_28428054.1150229024209 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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?
------=_Part_10645_28428054.1150229024209--