Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 7883 invoked from network); 6 Apr 2007 19:11:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Apr 2007 19:11:52 -0000 Received: (qmail 70877 invoked by uid 500); 6 Apr 2007 19:11:58 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 70273 invoked by uid 500); 6 Apr 2007 19:11:57 -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 70258 invoked by uid 99); 6 Apr 2007 19:11:57 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Apr 2007 12:11:57 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [63.91.129.46] (HELO moneygram.com) (63.91.129.46) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Apr 2007 12:11:48 -0700 Received: from ([172.16.30.75]) by NATMX02.moneygram.com with ESMTP id 5202983.2184965; Fri, 06 Apr 2007 14:11:25 -0500 Received: from pnams360.ad.moneygram.com ([172.16.121.15]) by pnams494.ad.moneygram.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 6 Apr 2007 14:11:24 -0500 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Subject: Stored Procedure Transaction Issue. Date: Fri, 6 Apr 2007 14:11:19 -0500 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Stored Procedure Transaction Issue. Thread-Index: Acd4YhsXpS+QojDmSLCDoGjNVVE2+gAHTXEw From: "Sudhir, Sudhir \(Contractor\)" To: X-OriginalArrivalTime: 06 Apr 2007 19:11:24.0819 (UTC) FILETIME=[5EB10E30:01C7787F] Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C7787F.5EBA4720" X-Virus-Checked: Checked by ClamAV on apache.org This is a multi-part message in MIME format. ------_=_NextPart_001_01C7787F.5EBA4720 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello,=0D=0A=0D=0AI am calling a stored procedure within oracle=2E The stor= ed procedure does=0D=0Asome inserts and returns a value (in this instance t= he id of the row=0D=0Ainserted)=2E But the transaction never gets committed= =2E There is no=0D=0Aexplicit commit within the stored procedure so I try t= o use the=0D=0Afollowing block to control and commit the TX=2E=0D=0A=0D=0A = try {=0D=0A=0D=0A = daoManager=2EstartTransaction();=0D=0A=0D=0A = orgDAO=2EsaveBusinessInformation(org);=0D=0A=0D=0A = daoManager=2EcommitTransaction();=0D=0A=0D=0A = } finally {=0D=0A=0D=0A daoMa= nager=2EendTransaction();=0D=0A=0D=0A }=0D=0A=0D=0AH= owever it seems like when I am calling a "stored procedure" the above=0D=0A= transaction calls are almost ignored=2E My current settings in the=0D=0Asql= map-config are=0D=0A=0D=0A=0D=0A=0D=0A =0D=0A=0D=0AIf I change the above to=0D=0A=0D=0A the calls=0D=0Asucc= eeds and the commit happens=2E But my question is: is there a reason=0D=0Aw= hy the transaction manager behaves one way for SQL calls versus stored=0D= =0Aprocedures?=0D=0A=0D=0A =0D=0A=0D=0AThanks,=0D=0A=0D=0ASudhir=0D=0A=0D= =0A=0D=0A=0D=0A-----------------------------------------=0D=0A=0D=0AThis me= ssage may contain confidential information=2E If you are not=0Athe intende= d recipient, please notify the sender immediately and=0Adelete this email f= rom your system=2E ------_=_NextPart_001_01C7787F.5EBA4720 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable =0D=0A=0D=0A=0D=0A=0D=0A=0D=0A=0D=0A=0D=0A=0D=0A=0D=0A=0D=0A=0D=0A=0D=0A=0D=0A=0D=0A
=0D=0A=0D=0A

Hello,

=0D=0A=0D=0A

I am calling a stored procedure within oracle=2E The stored= =0D=0Aprocedure does some inserts and returns a value (in this instance the= id of the=0D=0Arow inserted)=2E But the transaction never gets committed= =2E There is no explicit=0D=0Acommit within the stored procedure so I try t= o use the following block to=0D=0Acontrol and commit the TX=2E

=0D=0A=0D=0A

    &= nbsp;           &nbs= p;      =0D=0Atry {

=0D=0A= =0D=0A

      =             &nb= sp;            =     =0D=0AdaoManager=2EstartTransaction();

=0D=0A=0D=0A

    &= nbsp;           &nbs= p;            &= nbsp;     =0D=0AorgDAO=2EsaveBusinessInformation(o= rg);

=0D=0A=0D=0A

 &= nbsp;           &nbs= p;            &= nbsp;        =0D=0AdaoManager=2Ecom= mitTransaction();

=0D=0A=0D=0A

           &nbs= p;           =0D=0A}= finally {

=0D=0A=0D=0A

&n= bsp;            = ;            &n= bsp;         =0D=0AdaoManager= =2EendTransaction();

=0D=0A=0D=0A

           &= nbsp;           =0D= =0A}

=0D=0A=0D=0A

However= it seems like when I am calling a “stored=0D=0Aprocedure” the = above transaction calls are almost ignored=2E My current=0D=0Asettings in t= he sqlmap-config are

=0D=0A=0D=0A

<transactionManager type=3D"JDBC"=0D=0AcommitRequired= =3D"true">

=0D=0A=0D=0A

<= font size=3D2 face=3DArial> 

=0D=0A=0D=0A

If I change the above to

=0D=0A=0D=0A

<transactionManager type=3D"JDBC"=0D=0Acommit= Required=3D"false"= >=0D=0Athe calls succeeds and the commit happens=2E But my question is: = is there a=0D=0Areason why the transaction manager behaves one way for SQL = calls versus stored=0D=0Aprocedures?

=0D=0A=0D=0A

 

=0D=0A=0D=0A

Thanks,

=0D=0A=0D=0A

Sudhir

=0D=0A=0D=0A
=0D=0A=0D=0A= =0D=0A=0D=0A=0D=0A=0D=0A=0D=0AThis message may contain c= onfidential information=2E If you are not the intended recipient, please n= otify the sender immediately and delete this email from your system=2E ------_=_NextPart_001_01C7787F.5EBA4720--