Re: JPA + Postgres = autocommit?

Поиск
Список
Период
Сортировка
От Vladimir Sitnikov
Тема Re: JPA + Postgres = autocommit?
Дата
Msg-id CAB=Je-HM119fW9s0MAT2L7hRL-HPwwEwyROFzQuTeW=XvPdMeA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: JPA + Postgres = autocommit?  ("Davygora, Yuriy" <Yuriy.Davygora@sulzer.de>)
Ответы Re: JPA + Postgres = autocommit?  ("Davygora, Yuriy" <Yuriy.Davygora@sulzer.de>)
Re: JPA + Postgres = autocommit?  ("Davygora, Yuriy" <Yuriy.Davygora@sulzer.de>)
Список pgsql-jdbc

Yuriy>1.       In PgConnection.java, the autocommit is initially set to true in the declaration (private boolean autocommit = true). In the constructor of the PgConnection class, several options are checked (PGProperty), but there is none that has to do with autocommit. Thus, unless, the client explicitely calls setAutoCommit(false), it will remain true.

Just for the reference, the specification (see Connection#setAutoCommit javadoc) states that "By default, new connections are in auto-commit mode"

Yuriy>We are using a JTA data source and the transactions are managed by the JEE container

Why don't you use Payara's data source then?
It should solve the problem as Payara seems to have some setAutoCommit logic: https://github.com/payara/Payara/search?utf8=%E2%9C%93&q=setautocommit

Vladimir

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Vladimir Sitnikov
Дата:
Сообщение: Re: JPA + Postgres = autocommit?
Следующее
От: "Davygora, Yuriy"
Дата:
Сообщение: Re: JPA + Postgres = autocommit?