pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Jowett <oliver@opencloud.com>
To: Fabien JALABERT <fabien.jalabert@laposte.net>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: JDBC: "transaction aborted"
Date: Wed, 01 Sep 2010 20:26:41 +1200
Message-ID: <4C7E0E41.3080302@opencloud.com> (raw)
In-Reply-To: <4C7E036B.6080407@laposte.net>
References: <54191bbe-6765-4b1c-bbfd-8fd2d9e6024f@f25g2000yqc.googlegroups.com>
	<4C7DB511.9080807@postnewspapers.com.au>
	<4C7E036B.6080407@laposte.net>

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



view thread (4+ messages)

Message-ID: <4C7E0E41.3080302@opencloud.com>
Permalink:  ../4C7E0E41.3080302@opencloud.com/
Also on:    postgresql.org/message-id/4C7E0E41.3080302@opencloud.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: oliver@opencloud.com, fabien.jalabert@laposte.net
  Subject: Re: JDBC: "transaction aborted"
  In-Reply-To: <4C7E0E41.3080302@opencloud.com>
  References: <54191bbe-6765-4b1c-bbfd-8fd2d9e6024f@f25g2000yqc.googlegroups.com> <4C7DB511.9080807@postnewspapers.com.au> <4C7E036B.6080407@laposte.net> <4C7E0E41.3080302@opencloud.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox