X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 7FDC9D1E0E6 for ; Mon, 10 May 2004 13:25:16 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 87571-10 for ; Mon, 10 May 2004 13:24:56 -0300 (ADT) Received: from www.postgresql.com (www.postgresql.com [200.46.204.209]) by svr1.postgresql.org (Postfix) with ESMTP id DA983D1D5D9 for ; Mon, 10 May 2004 13:24:54 -0300 (ADT) Received: from NSNOVPS00411.nacio.xythos.com (212-59.84.64.master-link.com [64.84.59.212]) by www.postgresql.com (Postfix) with ESMTP id 161F9CF54AB for ; Mon, 10 May 2004 13:24:54 -0300 (ADT) Received: from xythos.com ([64.202.9.194]) by NSNOVPS00411.nacio.xythos.com with Microsoft SMTPSVC(5.0.2195.6713); Mon, 10 May 2004 09:24:47 -0700 Message-ID: <409FA4CB.6070305@xythos.com> Date: Mon, 10 May 2004 08:50:35 -0700 From: Barry Lind User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-us, en, ja MIME-Version: 1.0 To: pginfo Cc: pgsql-jdbc@postgresql.org Subject: Re: problem with transactions References: <409F6ED2.1050701@t1.unisoftbg.com> In-Reply-To: <409F6ED2.1050701@t1.unisoftbg.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 10 May 2004 16:24:47.0296 (UTC) FILETIME=[4F6B5C00:01C436AB] X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200405/41 X-Sequence-Number: 10051 I would suggest that you turn on sql statement logging on your database server and see exactly what the jdbc driver is sending to the server. I suspect this information will help you track down the problem. thanks, --Barry pginfo wrote: > Hi, > > We are using pg 7.4.2 + jdbc to connect to jboss. > > It looks that pg have problems with transactions and jdbc. > > My example: > > Connection con = ... I get connection to my db. > > con.setAutoCommit(false); // begin transaction > > // do some inserts > > con.rollback(); // rollback > > After this code all is working very well. > All inserts are rollbacked and so on. > > And now the second example: > > Connection con = ... I get connection to my db. > > con.setAutoCommit(false); // begin transaction > > // do some inserts > > con.rollback(); // rollback > con.setAutoCommit(true); // set autocommit. We are using connection > pool and will to have clear connection. > > For my supprice the last example do not rollback any inserts ! > I do not see nothink bad in this code, and also it is working perfect on > oracle + jdbc and also MSSQL + jdbc. > > Pls., can some one check the situation and post the result. > > I tryed to insert sole sllep for 5 sec. before the last > con.setAutoCommit(true); , but it do not help. > > Is it bug into the jdbc or pg ? > > I tested it also with pg 7.4.1 and 7.4. and I have the same problem. > > regards, > ivan. > > > ---------------------------(end of broadcast)--------------------------- > TIP 8: explain analyze is your friend