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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-jdbc by date

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