Skip site navigation (1) Skip section navigation (2)

Re: Bug: Transaction still open after error when autocommit=true

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Daniel Migowski" <dmigowski(at)ikoffice(dot)de>, "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Bug: Transaction still open after error when autocommit=true
Date: 2011-12-22 23:29:18
Message-ID: 4EF368EE0200002500044065@gw.wicourts.gov (view raw or flat)
Thread:
Lists: pgsql-jdbc
Daniel Migowski <dmigowski(at)ikoffice(dot)de> wrote:
 
> A small demo for the bug is attached.
 
The javadocs for Connection:
 
http://docs.oracle.com/javase/6/docs/api/java/sql/Connection.html
 
say:
 
| JDBC applications should use the appropritate Connection method
| such as setAutoCommit or setTransactionIsolation. Applications
| should not invoke SQL commands directly to change the connection's
| configuration when there is a JDBC method available.
 
I take that to mean that the right way to do this is to set
autoCommit to false and use the connection's commit() method.  If
you do it that way, is there a problem?
 
-Kevin

In response to

Responses

pgsql-jdbc by date

Next:From: Dave CramerDate: 2011-12-23 01:00:07
Subject: Re: Bug: Transaction still open after error when autocommit=true
Previous:From: Daniel MigowskiDate: 2011-12-22 21:09:43
Subject: Bug: Transaction still open after error when autocommit=true

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group