Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 78164 invoked from network); 14 Apr 2010 16:44:07 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 14 Apr 2010 16:44:07 -0000 Received: (qmail 55344 invoked by uid 500); 14 Apr 2010 16:44:06 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 55264 invoked by uid 500); 14 Apr 2010 16:44:06 -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 55257 invoked by uid 99); 14 Apr 2010 16:44:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Apr 2010 16:44:06 +0000 X-ASF-Spam-Status: No, hits=-5.0 required=10.0 tests=RCVD_IN_DNSWL_HI,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ejaz.mohammed@jpmorgan.com designates 159.53.110.137 as permitted sender) Received: from [159.53.110.137] (HELO sj1.jpmchase.com) (159.53.110.137) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Apr 2010 16:43:56 +0000 Received: from si4.svr.bankone.net (si4.svr.bankone.net [155.180.56.116]) by sj1.jpmchase.com (Switch-3.3.3mp/Switch-3.3.3mp) with ESMTP id o3EGhZjq022145 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Wed, 14 Apr 2010 12:43:35 -0400 X-DKIM: Sendmail DKIM Filter v2.5.6 sj1.jpmchase.com o3EGhZjq022145 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=jpmorgan.com; s=smtpout; t=1271263415; bh=leWrN1eqSmHZjTUVJVAY1h7M0419knQFInoKHke wgb8=; h=From:To:Date:Subject:Message-ID:References:In-Reply-To: Content-Transfer-Encoding:MIME-Version:Content-Type; b=LS6GyLrpqfg ZL87R2e9UdHQ8Ax+KkPI/6dpGfeX2ja13/SX1PEDNbio4Q9HWK+ui7QTweJNU9C9Kam GMbrFntEnNP9uSYGMduadxRhk8gWfkX3ltKH2+juAJE1UeNGfAXKox2NoUbbZM1pX9z /SFDM+FKggFzc7TLVRq26C5WaE= Received: from svr.bankone.net (imf3.svr.bankone.net [155.180.232.177]) by si4.svr.bankone.net (Switch-3.3.3mp/Switch-3.3.3mp) with ESMTP id o3EGhYnb014614 for ; Wed, 14 Apr 2010 12:43:34 -0400 Received: from ([169.69.182.78]) by imf3.svr.bankone.net with ESMTP id 5503234.22342749; Wed, 14 Apr 2010 12:43:29 -0400 Received: from HUBS207.exchad.jpmchase.net (169.69.212.230) by HUBCS201.exchad.jpmchase.net (169.69.182.78) with Microsoft SMTP Server (TLS) id 8.1.393.1; Wed, 14 Apr 2010 12:43:29 -0400 Received: from EMASC203VS01.exchad.jpmchase.net ([169.69.182.208]) by HUBS207.exchad.jpmchase.net ([169.69.212.230]) with mapi; Wed, 14 Apr 2010 12:43:10 -0400 From: Ejaz X Mohammed To: "user-java@ibatis.apache.org" Date: Wed, 14 Apr 2010 12:43:07 -0400 Subject: RE: Locks Thread-Topic: Locks Thread-Index: Acrb8KNIVxPpvVBZTTWfySPC2qKY3gAAH1FA Message-ID: <053E796F9A2C134D8F64530C1B7BE73F058D302B2F@EMASC203VS01.exchad.jpmchase.net> References: <053E796F9A2C134D8F64530C1B7BE73F058D3028C2@EMASC203VS01.exchad.jpmchase.net> <053E796F9A2C134D8F64530C1B7BE73F058D3028FF@EMASC203VS01.exchad.jpmchase.net> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-cr-hashedpuzzle: AnLR BchV BjDJ Co7N CuuW DZ1S Deoy DuaH EW2+ HOjr HmZC IGPo Jxgv LKzo LXaM LfD8;1;dQBzAGUAcgAtAGoAYQB2AGEAQABpAGIAYQB0AGkAcwAuAGEAcABhAGMAaABlAC4AbwByAGcA;Sosha1_v1;7;{F0339B8C-38B8-42FA-A380-7D9D5F0B4937};ZQBqAGEAegAuAG0AbwBoAGEAbQBtAGUAZABAAGoAcABtAG8AcgBnAGEAbgAuAGMAbwBtAA==;Wed, 14 Apr 2010 16:43:07 GMT;UgBFADoAIABMAG8AYwBrAHMA x-cr-puzzleid: {F0339B8C-38B8-42FA-A380-7D9D5F0B4937} acceptlanguage: en-US Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Virus-Checked: Checked by ClamAV on apache.org I changed the code to use plain jdbc instead of ibatis =2E=2E=2E as I said = I'm doing just SELECT =2E=2E=2E I started no tranasaction =2E=2E now I don'= t see any locks, perf seems to be better too =2E=2E=2E=0D=0A=0D=0AIf we sta= rt a transaction, sybase takes locks =2E=2E=2E read lock for SELECT =2E=2E= =2E =0D=0A=0D=0ACan we avoid starting TX during select in ibatis?=0D=0A=0D= =0AEjaz=0D=0A=0D=0A=0D=0A-----Original Message-----=0D=0AFrom: Jeff Butler = [mailto:jeffgbutler@gmail=2Ecom] =0D=0ASent: Wednesday, April 14, 2010 11:3= 6 AM=0D=0ATo: user-java@ibatis=2Eapache=2Eorg=0D=0ASubject: Re: Locks=0D=0A= =0D=0AI assume you're using SIMPLE datasource=2E With that data source, th= e=0D=0Aisolation level is set as a driver default=2E I just did a quick te= st=0D=0Awith HSQLDB and the default seems to be TRANSACTION_READ_COMMITTED = - a=0D=0Amiddle of the road isolation level=2E Maybe there is some setting= on=0D=0Athe Sybase driver that will allow you to change the default isolat= ion=0D=0Alevel?=0D=0A=0D=0AAlternatively, you can do it in code like this:= =0D=0A=0D=0Atry {=0D=0A sqlMapClient=2EstartTransaction(Connection=2ETRANS= ACTION_READ_UNCOMMITTED);=0D=0A=0D=0A -- do some work=0D=0A} finally {=0D= =0A sqlMapClient=2EendTransaction();=0D=0A}=0D=0A=0D=0AIf you are using so= me other datasource (like JNDI), then you'll need=0D=0Ato look to that data= source for information about changing the=0D=0Aisolation level=2E=0D=0A=0D= =0AJeff Butler=0D=0A=0D=0A=0D=0A=0D=0A=0D=0A=0D=0AOn Wed, Apr 14, 2010 at 9= :51 AM, Ejaz X Mohammed=0D=0A wrote:=0D=0A>= These are my settings =2E=2E=2E=0D=0A>=0D=0A> =A0 =A0=0D=0A> =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0cacheModelsEnabled=3D"true"=0D=0A> =A0 =A0 =A0 =A0 =A0 = =A0enhancementEnabled=3D"true"=0D=0A> =A0 =A0 =A0 =A0 =A0 =A0lazyLoadingEna= bled=3D"true"=0D=0A> =A0 =A0 =A0 =A0 =A0 =A0maxRequests=3D"32"=0D=0A> =A0 = =A0 =A0 =A0 =A0 =A0maxSessions=3D"10"=0D=0A> =A0 =A0 =A0 =A0 =A0 =A0maxTran= sactions=3D"5"=0D=0A> =A0 =A0 =A0 =A0 =A0 =A0useStatementNamespaces=3D"true= "=0D=0A> =A0 =A0 =A0 =A0/>=0D=0A>=0D=0A> =A0 =A0=0D=0A> =A0 =A0=0D=0A> =A0 =A0 =A0= =A0=0D=0A> =A0 =A0 =A0 =A0 =A0 =A0=0D=0A> =A0 =A0 =A0 = =A0 =A0 =A0=0D=0A> =A0 =A0 =A0 =A0 =A0 =A0=0D=0A> =A0 =A0 =A0 =A0 =A0 =A0=0D=0A> =A0 =A0 =A0 =A0 =A0 =A0=0D=0A> =A0 =A0 =A0 = =A0=0D=0A> =A0 =A0=0D=0A>=0D=0A>=0D=0A>= =0D=0A>=0D=0A> -----Original Message-----=0D=0A> From: Jeff Butler [mailto:= jeffgbutler@gmail=2Ecom]=0D=0A> Sent: Wednesday, April 14, 2010 9:44 AM=0D= =0A> To: user-java@ibatis=2Eapache=2Eorg=0D=0A> Subject: Re: Locks=0D=0A>= =0D=0A> It's dependent on the transaction isolation level set on your=0D=0A= > connection=2E =A0There are many variables involved - what is your=0D=0A> = environment (POOLED, UNPOOLED, JNDI, etc=2E)?=0D=0A>=0D=0A> Jeff Butler=0D= =0A>=0D=0A>=0D=0A> On Wed, Apr 14, 2010 at 9:38 AM, Ejaz X Mohammed=0D=0A> = wrote:=0D=0A>> Hello,=0D=0A>>=0D=0A>>=0D= =0A>>=0D=0A>> I have an application running on Sybase=2E DBAs tell me that = it is generating=0D=0A>> too many locks =2E=2E=2E I know that all I'm doing= is SELECT=2E=0D=0A>>=0D=0A>>=0D=0A>>=0D=0A>> I'm not sure how SELECT can c= reate locks in database=2E=0D=0A>>=0D=0A>>=0D=0A>>=0D=0A>> Any suggestions = ?=0D=0A>>=0D=0A>>=0D=0A>>=0D=0A>> Thanks=0D=0A>>=0D=0A>> Ejaz=0D=0A>>=0D=0A= >> This email is confidential and subject to important disclaimers and=0D= =0A>> conditions including on offers for the purchase or sale of securities= ,=0D=0A>> accuracy and completeness of information, viruses, confidentialit= y, legal=0D=0A>> privilege, and legal entity disclaimers, available at=0D= =0A>> http://www=2Ejpmorgan=2Ecom/pages/disclosures/email=2E=0D=0A>=0D=0A> = ---------------------------------------------------------------------=0D=0A= > To unsubscribe, e-mail: user-java-unsubscribe@ibatis=2Eapache=2Eorg=0D=0A= > For additional commands, e-mail: user-java-help@ibatis=2Eapache=2Eorg=0D= =0A>

=0D=0A> Th= is email is confidential and subject to important disclaimers and condition= s including on offers for the purchase or sale of securities, accuracy and = completeness of information, viruses, confidentiality, legal privilege, and= legal entity disclaimers, available at http://www=2Ejpmorgan=2Ecom/pages/d= isclosures/email=2E=0D=0A>

=0D=0A>=0D=0A> ----------------------= -----------------------------------------------=0D=0A> To unsubscribe, e-ma= il: user-java-unsubscribe@ibatis=2Eapache=2Eorg=0D=0A> For additional comma= nds, e-mail: user-java-help@ibatis=2Eapache=2Eorg=0D=0A>=0D=0A>=0D=0A=0D=0A= ---------------------------------------------------------------------=0D=0A= To unsubscribe, e-mail: user-java-unsubscribe@ibatis=2Eapache=2Eorg=0D=0AFo= r additional commands, e-mail: user-java-help@ibatis=2Eapache=2Eorg=0D=0A= =0D=0AThis email is confidential and subject to important disclaimers and= =0Aconditions including on offers for the purchase or sale of=0Asecurities,= accuracy and completeness of information, viruses,=0Aconfidentiality, lega= l privilege, and legal entity disclaimers,=0Aavailable at http://www=2Ejpmo= rgan=2Ecom/pages/disclosures/email=2E --------------------------------------------------------------------- To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org For additional commands, e-mail: user-java-help@ibatis.apache.org