Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 24265 invoked from network); 23 May 2006 14:58:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 23 May 2006 14:58:54 -0000 Received: (qmail 46670 invoked by uid 500); 23 May 2006 14:58:51 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 46646 invoked by uid 500); 23 May 2006 14:58:51 -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 46635 invoked by uid 99); 23 May 2006 14:58:50 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 May 2006 07:58:50 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of phpmonkey@gmail.com designates 64.233.162.207 as permitted sender) Received: from [64.233.162.207] (HELO nz-out-0102.google.com) (64.233.162.207) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 May 2006 07:58:49 -0700 Received: by nz-out-0102.google.com with SMTP id r28so1379368nza for ; Tue, 23 May 2006 07:58:28 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=j85CZy/EtaezHbpzsrTwkKxx+MjGl+PEUKPdge4S2wWXLnAyK9xZrzL7H0XVucA6OyK12UBu8SekMEsYmiFCJNNXj+83MO0XPL2uXiQlTmZH1tUT23n7yZ01ymOzSpTu66SObJEL8LGaaIY2ROs/bFHQ2gFQXUOWxLwUxI9gVXg= Received: by 10.64.131.17 with SMTP id e17mr1935652qbd; Tue, 23 May 2006 07:58:28 -0700 (PDT) Received: by 10.65.157.6 with HTTP; Tue, 23 May 2006 07:58:28 -0700 (PDT) Message-ID: <1d40f7c0605230758l207211bajf5866b63a226ca0f@mail.gmail.com> Date: Tue, 23 May 2006 04:58:28 -1000 From: "Jerome Gagner" To: user-java@ibatis.apache.org Subject: Re: Transaction Ibati MySql don't work In-Reply-To: <50CA25BD6EEA954FA592C097399942E30E464292@CM1.wis.local> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <50CA25BD6EEA954FA592C097399942E30E464292@CM1.wis.local> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N As larry said, make sure the tables are InnoDB, easy one to miss. MySQL happily plugs along w/ MyISAM pretending like it does transactions. On 5/23/06, Niels Beekman wrote: > You specified SetAutoCommitAllowed=3D"false", that instructs iBATIS to le= ave the default autocommit setting (true) in place, which causes automatic = commits, unless an SQLException occurs when executing a statement. Changing= it to "true" will cause iBATIS to use the "DefaultAutoCommit" setting. > > Niels > > -----Original Message----- > From: Gary Efra=EDn Laredo Chac=F3n [mailto:laredo.ge@pucp.edu.pe] > Sent: dinsdag 23 mei 2006 16:05 > To: brandon.goodin@gmail.com > Cc: user-java@ibatis.apache.org > Subject: Re: Transaction Ibati MySql don't work > > > > Thanks, > > Exactly I want that it does roollbak, but it does not do it, the changes = get to > persist, without commit. > > thanks very much > > ------ Mensaje original ------- > De : brandon.goodin@gmail.com > Para : user-java@ibatis.apache.org > Fecha : Tue, 23 May 2006 07:35:04 -0500 > Asunto : Re: Transaction Ibati MySql don\'t work > >Precisely, > > > >That is why i wanted to see the real code that was being called. The > >piece that i saw looked more like a sample than real code. The > >endTransaction without a commitTransaction will perform a rollback. > >iBATIS does not have an explicit rollback call. Basically, if you call > >startTransaction and then endTransaction without a commitTransaction, > >it is assumed that there was a problem and the rollback is performed. > > > >Thanks for the feedback Ed ! > > > >Brandon Goodin > > > >On 5/23/06, mrEdmundo wrote: > >> Hi, > >> > >> It\'s a bit difficult to tell from the code sample you\'ve provided, b= ut are > >> you calling sqlMap.commitTransaction(); at the end of your updates? > >> > >> Your code should be: > >> > >> try > >> { > >> sqlMap.startTransaction(); > >> > >> // do your updates > >> > >> sqlMap.commitTransaction(); > >> } > >> finally > >> { > >> sqlMap.endTransaction(); // will rollback if transaction not commi= tted > >> } > >> > >> Regards, Ed. > >> > >> -----Original Message----- > >> From: Gary Efra=EDn Laredo Chac=F3n [mailto:laredo.ge@pucp.edu.pe] > >> Sent: 23 May 2006 06:09 > >> To: brandon.goodin@gmail.com > >> Cc: user-java@ibatis.apache.org > >> Subject: Re: Transaction Ibati MySql don\'t work > >> > >> > >> > >> Thanks, > >> > >> The sqlMapConfig.xml file is: > >> > >> >> \"-//ibatis.apache.org//DTD SQL Map Config 2.0//EN\" > >> \"http://ibatis.apache.org/dtd/sql-map-config-2.dtd\"> > >> > >> >> enhancementEnabled=3D\"true\" maxRequests=3D\"32\" maxSessions=3D\"1= 0\" > >> maxTransactions=3D\"5\" useStatementNamespaces=3D\"false\"/> > >> > >> > >> > >> > >> > >> >> value=3D\"jdbc:mysql://hosting:3306/database\"/> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> Please help me > >> > >> > >> ------ Mensaje original ------- > >> De : brandon.goodin@gmail.com > >> Para : user-java@ibatis.apache.org, laredo.ge@pucp.edu.pe Fecha : Mon,= 22 > >> May 2006 20:30:03 -0500 Asunto : Re: Transaction Ibati MySql don\'t wo= rk > >> >Please provide how you have proven that the transactions are not > >> >working. Also, like Jerome stated, please post all configs and actual > >> >java code involved when asking for support. > >> > > >> >Thanks, > >> >Brandon > >> > > >> >On 5/22/06, Gary Efra=EDn Laredo Chac=F3n wro= te: > >> >> > >> >> > >> >> > >> >> Please help me > >> >> > >> >> I am used jdk1.5 + MySql 4.1.x + Ibatis 2.0 + JConnector 3.1.12 > >> >> (3.1.8a) and don\'t work transactions (allways commit for each > >> >> statement), my MySql database is a hosting on the other place, samp= le of > >> code: > >> >> > >> >> ClienteBean cliente =3D new ClienteBean(); Reader reader1 =3D > >> >> Resources.getResourceAsReader(\\\"maps/sqlMapConfig.xml\\\"); > >> >> SqlMapClient sqlMap =3D SqlMapClientBuilder.buildSqlMapClient(reade= r1); > >> >> > >> >> sqlMap.startTransaction(); > >> >> sqlMap.update(\\\"updateCorrelativo\\\",\\\"000\\\"); //update tabl= e > >> >> here allways sqlMap.endTransaction();//but It coult be rollbak > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> ___________________________________________________________________ > >> >> Si desea recibir, semanalmente, el Bolet=EDn Electr=F3nico de la PU= CP, > >> ingrese a: > >> >> http://www.pucp.edu.pe/boletin/ > >> >> > >> >> > >> > > >> > >> > >> ___________________________________________________________________ > >> Si desea recibir, semanalmente, el Bolet=EDn Electr=F3nico de la PUCP,= ingrese > >> a: > >> http://www.pucp.edu.pe/boletin/ > >> > >> > > > > > ___________________________________________________________________ > Si desea recibir, semanalmente, el Bolet=EDn Electr=F3nico de la PUCP, in= grese a: > http://www.pucp.edu.pe/boletin/ > >