Re: JPA + Postgres = autocommit?

Поиск
Список
Период
Сортировка
От Davygora, Yuriy
Тема Re: JPA + Postgres = autocommit?
Дата
Msg-id B204CB55F9D32D41A9A5413EA3F13F8C3BEC77AD@email.sulzer.de
обсуждение исходный текст
Ответ на Re: JPA + Postgres = autocommit?  (Craig Ringer <craig@2ndquadrant.com>)
Список pgsql-jdbc

 

  Hello,

 

  once again I would like to thank everyone who responded. Most of your hints spawned either some source code investigation or reading quite a lot of manuals or both. At the end, I did find the mistake. As should have been expected, it was not a bug in any of the software.

 

  The bug was in my domain.xml, in the bit that I never shared with you. The Datasource configuration was OK, but apart from that one must also reference the jndi names in the server configuration. Which I even did, however with an error. All my jdni-names had a prefix “jdbc/” which I omitted in the <resource-ref> tags by mistake. After I typed in the correct jndi names and restarted the server, the transaction management immediately started working.

 

  Sorry for having bothered you all and thanks again!

 

  Best regards,

  Yuriy

 

 

Von: Craig Ringer [mailto:craig@2ndquadrant.com]
Gesendet: Freitag, 2
9. Juli 2016 05:45
An: Davygora, Yuriy <Yuriy.Davygora@sulzer.de>
Cc: Lachezar Dobrev <l.dobrev@gmail.com>; Vladimir Sitnikov <sitnikov.vladimir@gmail.com>; List <pgsql-jdbc@postgresql.org>
Betreff: Re: [JDBC] JPA + Postgres = autocommit?

 

On 27 July 2016 at 16:50, Davygora, Yuriy <Yuriy.Davygora@sulzer.de> wrote:


Sulzer GmbH
Geschäftsführende Gesellschafter: Dr. Johann Sulzer, Albert Euba, Thomas Kahabka
Geschäftsführer: Angelika Rudolph, Dr. Michael Kraus
Sitz und Registergericht: Stuttgart HRB 7608
http://www.sulzer.de

 

  Hello Lachezar,

 

  thank you for your reply.

 

  First of all, let me list some of the things I had tried before I started digging into the source code of the Postgres JDBC driver and Eclipselink.

 

-          switching PGConnectionPoolDataSource.

-          both container managed and bean managed transactions.

-          REQUIRED and REQUIRES_NEW for container managed transactions.

 

  None of this worked.

 

 

IIRC with Glassfish back in the day I used org.postgresql.Driver and let Glassfish's connection pooler wrap its own DataSource around it.

 

 

 

  I ruled out the possibility of a bug in the Postgres JDBC driver and in EclipseLink. Only Payara remains. As said, for some reason, setAutoCommit is never called, which is the job of the transaction manager.

 

Yeah, that's pretty suspect.


 

--

 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

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

Предыдущее
От: Thomas Kellerer
Дата:
Сообщение: Re: ResultSet.getClob() causing problems when used with JPA's @Lob
Следующее
От: "Davygora, Yuriy"
Дата:
Сообщение: Re: JPA + Postgres = autocommit?