pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <heikki@enterprisedb.com>
To: Jignesh K. Shah <J.K.Shah@Sun.COM>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: JDBC XA Support and Sample code?
Date: Thu, 06 Dec 2007 17:55:06 +0000
Message-ID: <4758377A.60404@enterprisedb.com> (raw)
In-Reply-To: <47571061.9040506@sun.com>
References: <47571061.9040506@sun.com>

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



view thread (7+ messages)  latest in thread

Message-ID: <4758377A.60404@enterprisedb.com>
Permalink:  ../4758377A.60404@enterprisedb.com/
Also on:    postgresql.org/message-id/4758377A.60404@enterprisedb.com

 · 

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: heikki@enterprisedb.com, J.K.Shah@Sun.COM
  Subject: Re: JDBC XA Support and Sample code?
  In-Reply-To: <4758377A.60404@enterprisedb.com>
  References: <47571061.9040506@sun.com> <4758377A.60404@enterprisedb.com>

* 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