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 7C475D1F181 for ; Mon, 10 May 2004 10:16:57 -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 69228-09 for ; Mon, 10 May 2004 10:16:39 -0300 (ADT) Received: from mail.unisoftbg.com (unknown [194.12.229.207]) by svr1.postgresql.org (Postfix) with ESMTP id AE58ED1F0D7 for ; Mon, 10 May 2004 10:15:30 -0300 (ADT) Received: (qmail 28090 invoked by uid 507); 10 May 2004 13:23:43 -0000 Received: from unknown (HELO t1.unisoftbg.com) (jobsdb1@194.12.229.193) by 0 with SMTP; 10 May 2004 13:23:43 -0000 Message-ID: <409F6ED2.1050701@t1.unisoftbg.com> Date: Mon, 10 May 2004 14:00:18 +0200 From: pginfo User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: problem with transactions Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=1.1 tagged_above=0.0 required=5.0 tests=RCVD_IN_DSBL X-Spam-Level: * X-Archive-Number: 200405/38 X-Sequence-Number: 10048 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.