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

Re: JDBC XA Support and Sample code?

From: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
To: "Jignesh K(dot) Shah" <J(dot)K(dot)Shah(at)Sun(dot)COM>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: JDBC XA Support and Sample code?
Date: 2007-12-06 17:55:06
Message-ID: 4758377A.60404@enterprisedb.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
Jignesh K. Shah wrote:
> I am new to the XA world of PostgreSQL. What's the story of XA in 
> PostgreSQL JDBC Driver? Also are there examples on how to use the 
> "Experimental" XA driver in postgresql-jdbc?

As Kris pointed out, it's not experimental.

It's typically used together with an application server that also acts 
as the transaction manager, and manages the connections and transactions 
for you. In that case, you don't need to do anything special; if you use 
two database connections or other resource managers in a transaction, 
the application server will perform two-phase commit using the XA driver 
behind the scenes.

The tricky part is configuring the application server/transaction 
manager to use the XA-enabled PGXADataSource. That's different on each 
product. It would be nice to get a sample config file and tutorial on 
Glassfish, hint hint ;-)

-- 
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

In response to

Responses

pgsql-jdbc by date

Next:From: Garber, MikhailDate: 2007-12-06 18:08:14
Subject: Re: JDBC XA Support and Sample code?
Previous:From: Peter KoczanDate: 2007-12-06 16:13:56
Subject: Re: JDBC and GSSAPI/Krb5

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