Hibernate/JTA/PostgreSQL

From: "Jimmy Wan" <jwan(at)21technologies(dot)com>
To: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Hibernate/JTA/PostgreSQL
Date: 2007-12-05 20:46:15
Message-ID: 54D41E91F26CF6488C7088C89D9160F868BA94@21ctexg01.21technologies.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hello, I've been trying to simultaneously debug an issue with
connections
being left in the <IDLE in transaction> state. My software stack looks
something like this:

Custom J2EE Code & Jackrabbit JCR
Hibernate 3.2.0
Tranql 1.4.1/Tranql Connectors 1.4
Geronimo 2.0.2
PostgreSQL JDBC 8.2-504, 8.2-506, 8.2-507
(been upgrading to no avail)
PostgreSQL on the backend (8.2.4 on Windows or 8.2.3 on Linux)

I've also got a unit test environment that looks something like this:
Custom J2EE Code & Jackrabbit JCR
Hibernate 3.2.0
Tranql 1.4.1/Tranql Connectors 1.4
Embedded OpenEJB 1.0
PostgreSQL JDBC 8.2-504, 8.2-506, 8.2-507
(been upgrading to try and fix my problems to no avail)
PostgreSQL 8.2 on the backend.

I saw the following note to the postgresql-jdbc list:
http://archives.postgresql.org/pgsql-jdbc/2006-10/msg00060.php

Ludovic, I was wondering if your analysis for PostgreSQL evaluation
for compatibility with BTM was complete. Also, I was wondering
whether you could elaborate on the following statement about
Hibernate and JTA:

In particular, the following passage:
"I'm not 100% sure about this but the fact that you cannot mix local
and global transactions will prevent Hibernate applications to work
when built with JTA. There are many cases where these features that
look not that important at first are quite critical."

I had been under the assumption (misunderstanding?) that using the
JTASessionContext for Hibernate would force it to employ XA
transactions, but when stepping through the Hibernate code, I saw
that none of my Hibernate operations resulted in the enlistment of
XA resources.

I'm about to throw in the towel wrt using XA (we don't really need
to synchronize across multiple datasources).

I still consider myself an XA novice, so any pointers are helpful.

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Jignesh K. Shah 2007-12-05 20:56:01 JDBC XA Support and Sample code?
Previous Message Woody Woodring 2007-12-05 19:30:15 Connection attempt hangs when server is unresponsive