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

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.

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


-- 
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: <fbca3a7e-c460-e537-fb1c-e23b74ed3020@hogranch.com>
Permalink:  ../fbca3a7e-c460-e537-fb1c-e23b74ed3020@hogranch.com/
Also on:    postgresql.org/message-id/fbca3a7e-c460-e537-fb1c-e23b74ed3020@hogranch.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: pierce@hogranch.com
  Subject: Re: JPA + Postgres = autocommit?
  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>

* 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