Re: PostgreSQL (XADataSource) as Tomcat Resource - Mailing list pgsql-jdbc

From markds75
Subject Re: PostgreSQL (XADataSource) as Tomcat Resource
Date
Msg-id 1144354202.037433.241140@v46g2000cwv.googlegroups.com
Whole thread Raw
In response to Re: PostgreSQL (XADataSource) as Tomcat Resource  ("Guy Rouillier" <guyr@masergy.com>)
List pgsql-jdbc
Kodo is my JDO implementation. It's trying to access the database via
JNDI, which succeeds if I use the standard javax.sql.DataSource, but as
soon as I make it an XADataSource, I get the error. I used the tomcat
page you provided the link for to get things set up to begin with. But
since Tomcat itself doesn't have a transaction manager (hence my need
to use the Jencks library to get distributed transactions), they don't
talk about XADataSource at all, nor do they talk about using a
connection factory.

I'm using postgresql-8.1-405.jdbc3.jar as my driver. According to the
PostgreSQL JDBC FAQ:
    http://jdbc.postgresql.org/documentation/faq.html
XA support started in 8.1dev-403. I checked the classes in the Jar
itself, and it includes the org.postgresql.xa package (see
http://jdbc.postgresql.org/development/privateapi/index.html for the
JavaDocs).

The question may be: does the configuration change between using a
standard DataSource and an XADataSource? I would think that, at least
as far as setting up a JNDI resource, Tomcat wouldn't care if the
resource implements DataSource or XADataSource.

Most of the search results I found were from before (and mostly years
before) XA support was added to the JDBC driver. I was hoping to find
someone on this newsgroup with some experience using it... as I
understand, its only been 4-6 months since the support was added.

Mark


pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: thread hang on execute call
Next
From: Jim Nasby
Date:
Subject: Re: psql COPY with JDBC