Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bRzVW-0007Hk-8J for pgsql-jdbc@arkaria.postgresql.org; Tue, 26 Jul 2016 10:22:38 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bRzVU-0007lV-Ny for pgsql-jdbc@arkaria.postgresql.org; Tue, 26 Jul 2016 10:22:36 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bRzVT-0007kO-6c for pgsql-jdbc@postgresql.org; Tue, 26 Jul 2016 10:22:35 +0000 Received: from relay5-d.mail.gandi.net ([2001:4b98:c:538::197]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bRzVL-0003TZ-2Q for pgsql-jdbc@postgresql.org; Tue, 26 Jul 2016 10:22:34 +0000 Received: from mfilter37-d.gandi.net (mfilter37-d.gandi.net [217.70.178.168]) by relay5-d.mail.gandi.net (Postfix) with ESMTP id 965B141C0AF for ; Tue, 26 Jul 2016 12:22:24 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter37-d.gandi.net Received: from relay5-d.mail.gandi.net ([IPv6:::ffff:217.70.183.197]) by mfilter37-d.gandi.net (mfilter37-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id kHCcG8FFxDda for ; Tue, 26 Jul 2016 12:22:22 +0200 (CEST) X-Originating-IP: 78.159.140.212 Received: from [192.168.27.7] (client-140-212.speedy-net.bg [78.159.140.212]) (Authenticated sender: rado@edno.moe) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id BEF1541C08F for ; Tue, 26 Jul 2016 12:22:22 +0200 (CEST) Subject: Re: JPA + Postgres = autocommit? To: pgsql-jdbc@postgresql.org References: From: Radoslav Petrov Message-ID: <579739D8.2060900@edno.moe> Date: Tue, 26 Jul 2016 13:22:16 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------000001040104040303010602" X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org This is a multi-part message in MIME format. --------------000001040104040303010602 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 25.07.2016 09:54, Davygora, Yuriy wrote: > And here is an excerpt from the Payara domain.xml: > > * datasource-classname="org.postgresql.ds.PGSimpleDataSource"* name="PDMDataSource" res-type="javax.sql.DataSource"> > Am I missing something here? How do I disable the autocommit? Any help would be greatly appreciated. > IMO this part in bold is your problem i.e. the setting of DataSource class name. I've checked the documentation for PGSimpleDataSource (https://jdbc.postgresql.org/documentation/publicapi/org/postgresql/ds/PGSimpleDataSource.html) and there is the following explanation: Simple DataSource which does not perform connection pooling. Please note that I don't have experience with Payara/Eclipselink. Maybe you should use some of the other DataSource implementations in PostgreJDBC or configure dedicated connection pool like c3p0. -- Поздрави, | Best regards, Радослав Петров | Radoslav Petrov --------------000001040104040303010602 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit On 25.07.2016 09:54, Davygora, Yuriy wrote:
  And here is an excerpt from the Payara domain.xml:

<jdbc-connection-pool datasource-classname="org.postgresql.ds.PGSimpleDataSource" name="PDMDataSource" res-type="javax.sql.DataSource">
  Am I missing something here? How do I disable the autocommit? Any help would be greatly appreciated.

IMO this part in bold is your problem i.e. the setting of DataSource class name. I've checked the documentation for PGSimpleDataSource (https://jdbc.postgresql.org/documentation/publicapi/org/postgresql/ds/PGSimpleDataSource.html) and there is the following explanation:
Simple DataSource which does not perform connection pooling.

Please note that I don't have experience with Payara/Eclipselink. Maybe you should use some of the other DataSource implementations in PostgreJDBC or configure dedicated connection pool like c3p0.
-- 
Поздрави,       | Best regards,
Радослав Петров | Radoslav Petrov
--------------000001040104040303010602--