Freddy Villalba Arias wrote:
> Are there any drivers (for PostgreSQL v7.4.2) that support JTA?
> I’m interested in using JDBC 2.0, but I encourage you (and would greatly
> appreciate it) to give me as much information as you can about JTA /
> JDBC (different versions) support…
Short answer: the standard postgresql driver doesn't support XAResource,
and it doesn't make sense to support it.
JTA defines XAResource as the interface between the Transaction Manager
(TM) and Resource Manager (RM -- in this case the JDBC driver) for
resources that can participate in two-phase commit of global
transactions. While there's support for a one-phase optimization, that's
an option on the part of the TM, not the RM. There's no specification in
JTA of the interface between the TM and RM for local or one-phase
As the PostgreSQL backend itself (let alone the driver) doesn't support
two-phase commit or global transactions, it doesn't really make sense
for the driver to implement XAResource. It could implement it and then
refuse all requests to prepare transactions or switch transaction
context, but I don't know how useful that would be since it depends so
much on the TM's behaviour.
But I'd be surprised if your TM of choice did not support enlistment of
one-phase JDBC resources directly (with a bit of help from the app
server, which has to actually do the enlistment at the right point)
using the normal commit/rollback JDBC interface to talk to the driver.
In response to
pgsql-jdbc by date
|Next:||From: Oliver Jowett||Date: 2004-04-05 21:56:49|
|Subject: Re: what is lslowing me down? JDBC or Postgresql itself?|
|Previous:||From: Oliver Jowett||Date: 2004-04-05 21:40:37|
|Subject: Re: blob without largeobject api|