pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: rob stone <floriparob@gmail.com>
To: John R Pierce <pierce@hogranch.com>
To: pgsql-jdbc@postgresql.org
Subject: Re: JPA + Postgres = autocommit?
Date: Tue, 26 Jul 2016 08:48:21 +1000
Message-ID: <1469486901.7543.12.camel@gmail.com> (raw)
In-Reply-To: <fbca3a7e-c460-e537-fb1c-e23b74ed3020@hogranch.com>
References: <B204CB55F9D32D41A9A5413EA3F13F8C3BEC6C20@email.sulzer.de>
	<1469483299.7543.9.camel@gmail.com>
	<fbca3a7e-c460-e537-fb1c-e23b74ed3020@hogranch.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>

On Mon, 2016-07-25 at 14:53 -0700, John R Pierce wrote:
> On 7/25/2016 2:48 PM, rob stone wrote:
> > I know nothing about Payara, etc. but the "traditional" way of
> > handling
> > this in an application is to:-
> > 
> > BEGIN;
> > 
> > Do your inserts/updates etc.
> > 
> > COMMIT; or if you caught any errors during the inserting/updating,
> > then
> > 
> > ROLLBACK;
> 
> Not in Java/JDBC applications.   Rather,  they have the concept of 
> autocommit on/off, you configure it on a per connection basis.    
> commit() and rollback() are API calls to the java database
> connection 
> object.
> 

True, however issuing a BEGIN turns autocommit off.

> the real question here is how you convince the OP's stack of tools
> to 
> disable autocommit, and that I can't help with, but I'm sure its
> some 
> field in one of those XML files
> 
> 

Yes. I'd experiment with <property name="AutoCommit" value="false" />
or maybe value="off" and see if it makes a difference.



> -- 
> john r pierce, recycling bits in santa cruz
> 
> 
> 


-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



view thread (15+ messages)  latest in thread

Message-ID: <1469486901.7543.12.camel@gmail.com>
Permalink:  ../1469486901.7543.12.camel@gmail.com/
Also on:    postgresql.org/message-id/1469486901.7543.12.camel@gmail.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: floriparob@gmail.com, pierce@hogranch.com
  Subject: Re: JPA + Postgres = autocommit?
  In-Reply-To: <1469486901.7543.12.camel@gmail.com>
  References: <B204CB55F9D32D41A9A5413EA3F13F8C3BEC6C20@email.sulzer.de> <1469483299.7543.9.camel@gmail.com> <fbca3a7e-c460-e537-fb1c-e23b74ed3020@hogranch.com> <1469486901.7543.12.camel@gmail.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