pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: j.vreven@aca-it.be
To: pgsql-bugs@postgresql.org
Subject: BUG #6503: Idle in transaction while lazy loading in JSF render response
Date: Fri, 02 Mar 2012 17:01:37 +0000
Message-ID: <E1S3VrN-0002ZW-DY@wrigleys.postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      6503
Logged by:          Jo Vreven
Email address:      j.vreven@aca-it.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.





view thread (3+ messages)  latest in thread

Message-ID: <E1S3VrN-0002ZW-DY@wrigleys.postgresql.org>
Permalink:  ../E1S3VrN-0002ZW-DY@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/E1S3VrN-0002ZW-DY@wrigleys.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: j.vreven@aca-it.be, pgsql-bugs@postgresql.org
  Subject: Re: BUG #6503: Idle in transaction while lazy loading in JSF render response
  In-Reply-To: <E1S3VrN-0002ZW-DY@wrigleys.postgresql.org>
  References: <E1S3VrN-0002ZW-DY@wrigleys.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox