X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id B8F3F53933 for ; Sun, 3 Apr 2005 21:28:11 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 51964-04 for ; Sun, 3 Apr 2005 20:28:07 +0000 (GMT) Received: from sj-iport-5.cisco.com (sj-iport-5.cisco.com [171.68.10.87]) by svr1.postgresql.org (Postfix) with ESMTP id DE76B5375D for ; Sun, 3 Apr 2005 21:27:38 +0100 (BST) Received: from sj-core-4.cisco.com (171.68.223.138) by sj-iport-5.cisco.com with ESMTP; 03 Apr 2005 13:27:40 -0700 Received: from cjwhitew2k02 (sjc-vpn1-326.cisco.com [10.21.97.70]) by sj-core-4.cisco.com (8.12.10/8.12.6) with ESMTP id j33KRa3S010688; Sun, 3 Apr 2005 13:27:37 -0700 (PDT) Message-Id: <200504032027.j33KRa3S010688@sj-core-4.cisco.com> Reply-To: From: "Chris White (cjwhite)" To: "'Kris Jurka'" Cc: Subject: Re: JDBC and transactions Date: Sun, 3 Apr 2005 13:27:36 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Thread-Index: AcU3VnILOue14Me7SgqD6Y1WSVVLcwBNQHkg In-Reply-To: X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.404 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE X-Spam-Level: X-Archive-Number: 200504/7 X-Sequence-Number: 12614 Thanks that helps me solve my problem. -----Original Message----- From: Kris Jurka [mailto:books@ejurka.com] Sent: Friday, April 01, 2005 11:33 PM To: Chris White (cjwhite) Cc: pgsql-jdbc@postgresql.org Subject: Re: [JDBC] JDBC and transactions On Fri, 1 Apr 2005, Chris White (cjwhite) wrote: > 1) When does a transaction start? As soon as I do the first > insert/update on the connection or as soon as I set autocommit off? > 2) After doing a commit, when does the next transaction start? This depends on the driver version you are using. The 7.4 driver starts a transaction immediately upon setAutoCommit(false) and starts the next transaction immediately upon commit. The 8.0 driver starts the transaction on the first execution for both the initial and subsequent transactions. Kris Jurka