Skip site navigation (1) Skip section navigation (2)

BUG #6503: Idle in transaction while lazy loading in JSF renderresponse

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 renderresponse
Date: 2012-03-02 17:01:37
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugspgsql-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

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

* 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

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

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


pgsql-bugs by date

Next:From: Christopher BrowneDate: 2012-03-02 18:38:44
Subject: Re: slony replication issue
Previous:From: Nie, GuocongDate: 2012-03-02 09:15:44
Subject: slony replication issue

pgsql-jdbc by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group