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

Re: XA Support for Postgres

From: Håkan Jacobsson <hakan(dot)jacobsson(at)relevanttraffic(dot)com>
To: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
Cc: "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: XA Support for Postgres
Date: 2008-01-07 16:26:11
Message-ID: 5580CB5EB883C44587BC48FA0E5459221D69C264E2@RTSRV02.relevanttraffic.local (view raw or flat)
Thread:
Lists: pgsql-jdbc
Heikki,

Thanx for your answer.
So, if I want XA-support I need postgresql 8.1 at least on the databases I need to use?

I'm using a postgres-ds.xml with XA-support (JBoss config file) which I think you suggested to use (I found it on some jira-related site). Is that all I need to have XA-support/two-phase-commit-support? I mean there is nothing to modify in my code or elsewhere?

Håkan Jacobsson - System Developer
----------------------------------------------------------------

RELEVANT TRAFFIC EUROPE AB, Riddarg 17D, SE-114 57 Sthlm, Sweden

Mobile (+46) 736 56 97 58
Direct   (+46) 8 56 24 98 05
Phone to office (+46) 8 678 97 50 || Fax (+46) 8 661 19 22


-----Ursprungligt meddelande-----
Från: Heikki Linnakangas [mailto:hlinnaka(at)gmail(dot)com] För Heikki Linnakangas
Skickat: den 7 januari 2008 17:06
Till: Håkan Jacobsson
Kopia: pgsql-jdbc(at)postgresql(dot)org
Ämne: Re: [JDBC] XA Support for Postgres

Håkan Jacobsson wrote:
> Hi,
>
> I've posted earlier about this. I had problems connecting to the two postgresql databases our company system uses when migrating to JBoss 4.2.2.GA .
> Lots of exceptions about 'Generic JDBC connection can not be created' (something like that).
> I got a solution from a guy here at the mailing list. By using a JBoss database configuration file (postgres-ds.xml)  with 'XA-support' we got rid of the exceptions.
> I've tried to search google to understand what this 'XA-support' really does, but I haven't  found that much (other than an old thread 'XA-support for Postgres) dating back to 2005.
> Can someone point me to some good documentation for the XA-support for Postgres?

X/Open XA is a standard interface for performing two-phase commit across
different resource managers, like databases.

In Java-world, XA is mapped to the Java Transaction API (JTA). XA
support basically means that the driver comes with an implementation of
the javax.sql.XADataSource interface.

You need two-phase commit if you want to update two databases in a
single atomic transaction.

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

In response to

Responses

pgsql-jdbc by date

Next:From: Daniel MigowskiDate: 2008-01-07 16:30:09
Subject: Re: TypeInfoCache
Previous:From: Christian SchröderDate: 2008-01-07 16:22:16
Subject: Re: Missing fields in getColumns() result

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