Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 38946 invoked from network); 30 Jul 2007 18:32:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Jul 2007 18:32:08 -0000 Received: (qmail 13086 invoked by uid 500); 30 Jul 2007 18:32:05 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 13073 invoked by uid 500); 30 Jul 2007 18:32:05 -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 13062 invoked by uid 99); 30 Jul 2007 18:32:05 -0000 Received: from Unknown (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Jul 2007 11:32:05 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of andrey.rogov@gmail.com designates 209.85.146.176 as permitted sender) Received: from [209.85.146.176] (HELO wa-out-1112.google.com) (209.85.146.176) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Jul 2007 18:32:00 +0000 Received: by wa-out-1112.google.com with SMTP id j5so2097111wah for ; Mon, 30 Jul 2007 11:31:40 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=PpWdkxeJiYLvQ8SguK0TLiORtrM+b4vj6gjqYZ4QRelgwB5XxcAOW9OS5ZFS/nvwbcyUcL+Pt5FwvFMUNXqzwkQJYpyPEaegIvr3Gxwf4NnUVHHpVJviXTSNyQeL05n83T5qmIAeIlLLIXMZDbgW1n/4ZA2bdqlWu3hD8ttCdZk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=n6aZ46pj1aw89k/C7PL7Nt/1IsS5sXW0Qgy8tniTqcv9GiUdbHcWaDNuR+K+W4TNgO3+A+Wls4Rmc5JD6kmaEJqEEmOjaFuqvsCxhDfc5+wJTD9FLAZlWV657IxwD2uY+ps9yJ6bVNqB9lqgAO198O19ncCg46sbKuZlhprj4dY= Received: by 10.114.210.2 with SMTP id i2mr5885649wag.1185820300372; Mon, 30 Jul 2007 11:31:40 -0700 (PDT) Received: by 10.115.22.20 with HTTP; Mon, 30 Jul 2007 11:31:40 -0700 (PDT) Message-ID: <43c99d630707301131s7dcba9bfj969204c0c3a6bac5@mail.gmail.com> Date: Mon, 30 Jul 2007 22:31:40 +0400 From: "Andrey Rogov" To: user-java@ibatis.apache.org Subject: Re: programmatic transaction management in ibatis In-Reply-To: <8A16D379C0F094418CFB474042AA61AF94033E@MSGBANCLB2WIN.DMN1.FMR.COM> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_27581_27368857.1185820300349" References: <8A16D379C0F094418CFB474042AA61AF94033E@MSGBANCLB2WIN.DMN1.FMR.COM> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_27581_27368857.1185820300349 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, To better understand how to work with declarative transactions spring + ibatis look at two samples. 1. - Ibm developers works shows how to apply AOP method. http://www.ibm.com/developerworks/search/searchResults.jsp?searchType=1&searchSite=dW&searchScope=dW&query=SPRING apache geronimo & spring framework *Part 4: Throwing Spring AOP and Spring Web Flow into the mix* 2. - and without AOP - jPetStore sample spring + ibatis on the spring site / regards, Andrey 2007/7/30, Elangovan, Kumaravel : > > > Hi, > > We would like to implement programmatic transaction management in one > action class of our application (spring with ibatis SQL maps) as it involves > in updation of two tables. > > current* SqlMapConfig.properties* is > > > > value="${datasourcename}"/> > > > > and* dao.xml* is > > > > > > value="ibatis/FsaPlusAdmin/SqlMapConfig.xml" /> > > implementation="name of the implementation" /> > > > > We want transaction to be remanin default except in that action class(Here > transaction has to be rolled back if updation of 1st table fails). > > As I am new to ibatis, could anyone please explain how to configure > external transaction and to use that in the action class. > > Regards, > kumar > ------=_Part_27581_27368857.1185820300349 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
Hi,
To better understand how to work with declarative transactions spring + ibatis look at two samples.
1. - Ibm developers works shows how to apply AOP method.
apache geronimo & spring framework Part 4: Throwing Spring AOP and Spring Web Flow into the mix
 
2. - and without AOP - jPetStore sample spring + ibatis on the spring site /
 
 
regards, Andrey


 
2007/7/30, Elangovan, Kumaravel <kumaravel.elangovan@fmr.com>:

Hi,

We would like to implement programmatic transaction management in one action class of our application (spring with ibatis SQL maps) as it involves in updation of two tables.

current SqlMapConfig.properties is

        <transactionManager commitRequired="true" type="JDBC">        
                <dataSource type="JNDI">
                        <property name="DataSource" value="${datasourcename}"/>        
                </dataSource>    
        </transactionManager>

and dao.xml is

<daoConfig>
        <!-- Example SQL Maps DAO Configuration -->
        <context>
                <transactionManager type="SQLMAP">
                        <property name="SqlMapConfigResource" value="ibatis/FsaPlusAdmin/SqlMapConfig.xml" />
                </transactionManager>
                <dao interface="name of the interface" implementation="name of the implementation" />
</context>
</daoConfig>

We want transaction to be remanin default except in that action class(Here transaction has to be rolled back if updation of 1st table fails).

As I am new to ibatis, could anyone please explain how to configure external transaction and to use that in the action class.

Regards,
kumar


------=_Part_27581_27368857.1185820300349--