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

Re: JDBC: "transaction aborted"

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Fabien JALABERT <fabien(dot)jalabert(at)laposte(dot)net>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: JDBC: "transaction aborted"
Date: 2010-09-01 08:26:41
Message-ID: 4C7E0E41.3080302@opencloud.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
Fabien JALABERT wrote:
> Hello, if I turn on autocommit, will I be able to process transactions
> with begin/commit/rollback as before ?

"Maybe" - but you shouldn't be doing that anyway. The JDBC model expects
that to do explicit transaction demarcation, you turn off autocommit and
use methods on Connection to do commit/rollback. You shouldn't be
issuing queries with explicit BEGIN/COMMIT/ROLLBACK.

see e.g.
http://download.oracle.com/javase/1.3/docs/guide/jdbc/getstart/connection.html#1004665

-O

In response to

pgsql-jdbc by date

Next:From: Alessandro Di BellaDate: 2010-09-02 15:04:36
Subject: Bug in implementation of java.sql.DatabaseMetaData
Previous:From: Craig RingerDate: 2010-09-01 08:18:25
Subject: Re: JDBC: "transaction aborted"

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