Re: JPA + Postgres = autocommit?

From: Vladimir Sitnikov <sitnikov(dot)vladimir(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Cc: Radoslav Petrov <rado(at)edno(dot)moe>
Subject: Re: JPA + Postgres = autocommit?
Date: 2016-07-26 11:16:02
Message-ID: CAB=Je-HcFH8KPZuTrRR=UjOpaG+vs1O70SwmSbcqRWucxiecSg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Radoslav>Maybe you should use some of the other DataSource implementations
in PostgreJDBC or configure dedicated connection pool like c3p0.

The advice to use "decent connection pooler" is good (I would recommend
Hikari-CP), however it should not matter for "autocomittment" (how would
you spell that? :)

Yuriy, can you share test project that reproduces the issue?
You might have missed @Transacted or something like that in your
application code.

What is the exact error you are running into?

As far as I understand, the following should happen:
1) DataSource produces connection with any autocommit setting
2) JPA should call con.setAutocommit(false) when it senses the "start of
transaction" at the application side

I bet there is no transaction created/enabled at application side.

Vladimir

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Vladimir Sitnikov 2016-07-26 11:22:04 Re: JPA + Postgres = autocommit?
Previous Message Radoslav Petrov 2016-07-26 10:22:16 Re: JPA + Postgres = autocommit?