BUG #6503: Idle in transaction while lazy loading in JSF render response

From: j(dot)vreven(at)aca-it(dot)be
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #6503: Idle in transaction while lazy loading in JSF render response
Date: 2012-03-02 17:01:37
Message-ID: E1S3VrN-0002ZW-DY@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-jdbc

The following bug has been logged on the website:

Bug reference: 6503
Logged by: Jo Vreven
Email address: j(dot)vreven(at)aca-it(dot)be
PostgreSQL version: 9.0.0
Operating system: MAC OSX
Description:

This bug was not in jdbc4 driver: 8.4-701
But is introduced in jdbc4 driver: 8.4-702
It is still present in 9.1-901

Context:
* Tomcat 7
* JPA2 Hibernate
* Atomikos
* Spring
* JTA transaction manager (using org.postgresql.xa.PGXADataSource)

===

If in the JSF lifecycle render-response an element is fetched by means of
lazy loading (that was not fetched in invoke-application lifecycle) a
transaction will be started but it remains idle in transaction for
postgres.

The JTA Transaction manager has no active transactions at that moment, so
for JTA everything seems commit/rollback.

The connection seems to be back in the connectionpool, since the transaction
was used for only read operations no harm is done, and the connection
becomes idle for postgres when the next thread invokes a commit on this
connection.

Workaround 1: Use version 8.4-701 or lower
Workaround 2: JSF phaselistener to begin and rollback transaction before and
after render-response.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Christopher Browne 2012-03-02 18:38:44 Re: slony replication issue
Previous Message Nie, Guocong 2012-03-02 09:15:44 slony replication issue

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kevin Grittner 2012-03-02 20:51:51 Re: BUG #6503: Idle in transaction while lazy loading in JSF render response
Previous Message Paweł Omelko 2012-02-29 10:18:33 JDBC4 Postgresql Driver, Version 9.1-901 - Is it stable or dev version?