Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 24991 invoked from network); 4 Mar 2008 23:20:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Mar 2008 23:20:50 -0000 Received: (qmail 10306 invoked by uid 500); 4 Mar 2008 23:20:43 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 10293 invoked by uid 500); 4 Mar 2008 23:20:43 -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 10282 invoked by uid 99); 4 Mar 2008 23:20:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Mar 2008 15:20:43 -0800 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=HTML_FONT_FACE_BAD,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of TomH@a-t-g.com designates 65.171.64.184 as permitted sender) Received: from [65.171.64.184] (HELO yitweb11.a-t-g.com) (65.171.64.184) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Mar 2008 23:19:54 +0000 Received: from mail.a-t-g.com ([65.171.64.187]) by yitweb11.a-t-g.com with Microsoft SMTPSVC(5.0.2195.6713); Tue, 4 Mar 2008 17:20:09 -0600 Received: from mail.a-t-g.com ([65.171.64.163] helo=mail.a-t-g.com) by ASSPCentral; 4 Mar 2008 17:20:09 -0600 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C87E4E.4D02CF0E" Subject: RE: queryForList/Map/Object... rollbacks Date: Tue, 4 Mar 2008 17:20:12 -0600 Message-ID: In-reply-to: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: queryForList/Map/Object... rollbacks Thread-Index: Ach+QxzbEf9HhyrMQo+ARQMG4NTYPgACfx1w From: "Tom Henricksen" To: X-OriginalArrivalTime: 04 Mar 2008 23:20:10.0014 (UTC) FILETIME=[4A5BD3E0:01C87E4E] X-Virus-Checked: Checked by ClamAV on apache.org This is a multi-part message in MIME format. ------_=_NextPart_001_01C87E4E.4D02CF0E Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Currently we are using JDBC with simple datasource. =20 =20 But we are transitioning to JNDI datasource.=20 =20 This is just a web application. I will take a look at the Wiki. =20 So is this default behavior of iBatis to create a transaction and roll it back for even a select? =20 Would JTA change this? =20 Thanks, Tom =20 =20 -----Original Message----- From: Jeff Butler [mailto:jeffgbutler@gmail.com]=20 Sent: Tuesday, March 04, 2008 3:53 PM To: user-java@ibatis.apache.org Subject: Re: queryForList/Map/Object... rollbacks =20 What transaction manager are you using? Is this an EJB application with CMT, or just a web application? Have you read the information in the WIKI about configuring iBATIS on WebSphere? =20 http://opensource.atlassian.com/confluence/oss/display/IBATIS/Environmen t+Specific+Information =20 Jeff Butler =20 On Tue, Mar 4, 2008 at 3:32 PM, Tom Henricksen wrote: We are performance monitoring our application and my DBA let me know that we had over 3 MILLION rollbacks in a single day. We are using WebSphere to DB2 on Win2k3 servers. I looked in our code and could not find anything. Used p6spy and found that every time queryForXXX is called I received a rollback. Stepping through the queryForList code in SqlMapExecutorDelegate.java the autoStartTransaction starts a transaction if none is present and since we don't have commitRequired set, the autoEndTransaction will cause a rollback. I assume there is a good reason to start the transaction here. It seems like extra work creating a transaction that will always be rolled back. Can someone explain why this is good to me so I can forward the information to my DBA? Any links supporting the argument would be great. Is there a way to use the queryForXXX without creating a transaction? I assume it is better to not have commitRequired? Thanks for your time. =20 Tom Henricksen Consultant Advanced Technologies Group, Inc. =20 =20 ------_=_NextPart_001_01C87E4E.4D02CF0E Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Currently we are using JDBC with = simple datasource.

 

<transactionManager type=3D"JDBC">

         &= nbsp;  <dataSource type=3D"SIMPLE">

 

But we are transitioning to JNDI datasource. =

 

This is just a web application.  I will = take a look at the Wiki.

 

So is this default behavior of iBatis to = create a transaction and roll it back for even a select?

 

Would JTA change this?

 

Thanks,

Tom

 

 

-----Original = Message-----
From: Jeff Butler [mailto:jeffgbutler@gmail.com]
Sent: Tuesday, March 04, = 2008 3:53 PM
To: = user-java@ibatis.apache.org
Subject: Re: queryForList/Map/Object... rollbacks

 

What transaction manager are you = using?

Is this an EJB application with CMT, or just = a web application?

Have you read the information in the WIKI = about configuring iBATIS on WebSphere?

 

 

Jeff Butler



 

On Tue, Mar 4, 2008 at 3:32 PM, Tom = Henricksen <TomH@a-t-g.com> = wrote:

We are performance monitoring our application = and my DBA let me know that we had over 3 MILLION rollbacks in a single = day.  We are using WebSphere to DB2 on Win2k3 servers.

I looked in our code and could not find anything.  Used p6spy and = found that every time queryForXXX is called I received a rollback.  Stepping = through the queryForList code in SqlMapExecutorDelegate.java the = autoStartTransaction starts a transaction if none is present and since we don't have = commitRequired set, the autoEndTransaction will cause a rollback.

I assume there is a good reason to start the transaction here.  It = seems like extra work creating a transaction that will always be rolled = back.  Can someone explain why this is good to me so I can forward the = information to my DBA?  Any links supporting the argument would be great.  Is = there a way to use the queryForXXX without creating a transaction?  I = assume it is better to not have commitRequired?

Thanks for your time.

 

Tom = Henricksen
Consultant
Advanced Technologies Group, Inc.

 

 

------_=_NextPart_001_01C87E4E.4D02CF0E--